Skip to content

Commit

Permalink
docs(README): Link objectMode and first use of info (#1400)
Browse files Browse the repository at this point in the history
  • Loading branch information
dandv authored and indexzero committed Aug 21, 2018
1 parent 10a270d commit a32aa3c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ A logger accepts the following parameters:

| Name | Default | Description |
| ------------- | ---------------------- | --------------- |
| `level` | `'info'` | Log only if `info.level` less than or equal to this level |
| `level` | `'info'` | Log only if [`info.level`](#streams-objectmode-and-info-objects) less than or equal to this level |
| `levels` | `winston.config.npm` | Levels (and colors) representing log priorities |
| `format` | `winston.format.json` | Formatting for `info` messages (see: [Formats]) |
| `transports` | `[]` _(No transports)_ | Set of logging targets for `info` messages |
Expand Down Expand Up @@ -194,9 +194,10 @@ logger.configure({
### Streams, `objectMode`, and `info` objects

In `winston`, both `Logger` and `Transport` instances are treated as
`objectMode` streams that accept an `info` object. The `info`
object represents a single log message. The object itself is mutable. Every
`info` must have at least the `level` and `message` properties:
[`objectMode`](https://nodejs.org/api/stream.html#stream_object_mode)
streams that accept an `info` object. The `info` object represents a
single log message. The object itself is mutable. Every `info` must
have at least the `level` and `message` properties:

``` js
{
Expand Down

0 comments on commit a32aa3c

Please sign in to comment.