Skip to content

Commit

Permalink
updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaWise committed Oct 24, 2023
1 parent 16bbc93 commit 3d3c6cb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/writers.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ Most applications shouldn't have to worry about the `pingDelay` option. Internal

### Master logging methods

The following methods write data to the log file. Each method is used for a particular purpose.

- `masterLogger.STARTING_UP()`: This MUST be the first thing logged whenever a master process first starts up.
- `masterLogger.STARTING_UP_COMPLETED()`: This SHOULD be logged after all workers have been spawned, and their HTTP servers have all been started.
- `masterLogger.SHUTTING_DOWN()`: This SHOULD be logged when the master process wants to initiate a graceful shutdown procedure, but before any workers have been instructed to shut down.
Expand Down Expand Up @@ -153,6 +155,8 @@ The `highWaterMark` and `outputDelay` options control how logs are batched. If e

### Worker logging methods

The following methods write data to the log file. Each method is used for a particular purpose.

- `workerLogger.WORKER_STARTED()`: This SHOULD be logged when the worker process starts, before starting its HTTP server or performing its setup procedure (if any).
- `workerLogger.WORKER_GOING_ONLINE()`: This SHOULD be logged after the worker process completes its setup procedure (if any), but before starting its HTTP server.
- `workerLogger.WORKER_ONLINE()`: This SHOULD be logged when the worker process successfully starts its HTTP server.
Expand Down Expand Up @@ -196,6 +200,8 @@ Whenever a worker process receives an HTTP request, you should use the [WorkerLo

### Request logging methods

The following methods write data to the log file. Each method is used for a particular purpose.

- `requestLogger.REQUEST(req)`: This SHOULD be logged when the associated HTTP request is first received by the server. Only the request's "head" needs to be received; the request body may still be pending.
- `requestLogger.REQUEST_META(data)`: This can be logged to associate arbitrary application-specific metadata to the request.
- `requestLogger.RESPONSE(statusCode[, error])`: This SHOULD be logged when a response is sent for the associated HTTP request. Only the response's "head" needs to be sent; the response body may still be pending. Passing an `error` indicates that an unexpected error occurred while trying to handle the request.
Expand Down

0 comments on commit 3d3c6cb

Please sign in to comment.