@@ -423,7 +423,7 @@ rules and best practices for serializer functions:
423
423
- A serializer function * should never throw* . The bunyan library * does*
424
424
protect somewhat from this: if the serializer throws an error, then
425
425
bunyan will (a) write an ugly message on stderr (along with the traceback),
426
- and (b) the field in the log record will be replace with a short error message.
426
+ and (b) the field in the log record will be replaced with a short error message.
427
427
For example:
428
428
429
429
```
@@ -445,7 +445,7 @@ rules and best practices for serializer functions:
445
445
- A serializer function *should never mutate the given object*. Doing so will
446
446
change the object in your application.
447
447
448
- - A serializer function *should be defensive*. In my experience it is common to
448
+ - A serializer function *should be defensive*. In my experience, it is common to
449
449
set a serializer in an app, say for field name "foo", and then accidentally
450
450
have a log line that passes a "foo" that is undefined, or null, or of some
451
451
unexpected type. A good start at defensiveness is to start with this:
@@ -655,7 +655,7 @@ Pretty-printed:
655
655
is the name of the service/app using Bunyan for logging.
656
656
- ` hostname ` : Required. String. Provided or determined at Logger creation.
657
657
You can specify your hostname at Logger creation or it will be retrieved
658
- vi ` os.hostname() ` .
658
+ via ` os.hostname() ` .
659
659
- ` pid ` : Required. Integer. Filled in automatically at Logger creation.
660
660
- ` time ` : Required. String. Added by Bunyan. Can be overridden.
661
661
The date and time of the event in [ ISO 8601
@@ -732,7 +732,7 @@ follow (feedback from actual users welcome).
732
732
- ` req.username` : Authenticated user (or for a 401 , the user attempting to
733
733
auth).
734
734
- Some mechanism to calculate response latency. " restify" users will have
735
- a " X-Response-Time" header . A ` latency` custom field would be fine.
735
+ an " X-Response-Time" header . A ` latency` custom field would be fine.
736
736
- ` req.body` : If you know that request bodies are small (common in APIs,
737
737
for example), then logging the request body is good.
738
738
@@ -1066,7 +1066,7 @@ used for anything else.</td>
1066
1066
1067
1067
** Note on log rotation** : Often you may be using external log rotation utilities
1068
1068
like ` logrotate` on Linux or ` logadm` on SmartOS/ Illumos . In those cases, unless
1069
- your are ensuring " copy and truncate" semantics (via ` copytruncate` with
1069
+ you are ensuring " copy and truncate" semantics (via ` copytruncate` with
1070
1070
logrotate or ` -c` with logadm) then the fd for your ' file' stream will change.
1071
1071
You can tell bunyan to reopen the file stream with code like this in your
1072
1072
app:
0 commit comments