Skip to content

Commit

Permalink
Merge pull request #20 from victor0801x/doc-cli
Browse files Browse the repository at this point in the history
doc: fix v2.x cli options
  • Loading branch information
mcollina committed Aug 8, 2018
2 parents dc30eeb + da4f3da commit 4a06388
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,21 @@ pino app.js | pino-pretty
+ `--colorize` (`-c`): Adds terminal color escape sequences to the output.
+ `--crlf` (`-f`): Appends carriage return and line feed, instead of just a line
feed, to the formatted log line.
+ `--dateFormat` (`-d`): Sets the format string to apply when translating the date
to human readable format (see: `--translateTime`). The default format string
is `'yyyy-mm-dd HH:MM:ss.l o'`. For a list of available pattern letters
see the [`dateformat` documentation](https://www.npmjs.com/package/dateformat).
When the value is anything other than the default value, `--translateTime` is
implied.
+ `--errorProps` (`-e`): When formatting an error object, display this list
of properties. The list should be a comma separated list of properties Default: `''`.
+ `--levelFirst` (`-l`): Display the log level name before the logged date and time.
+ `--errorLikeObjectKeys` (`-k`): Define the log keys that are associated with
error like objects. Default: `err,error`.
+ `--messageKey` (`-m`): Define the key that contains the main log message.
Default: `msg`.
+ `--localTime` (`-n`): When translating the time to a human readable format,
use the system timezone for displaying the time.
+ `--translateTime` (`-t`): Translate the epoch time value into a human readable
date and time string. See `--dateFormat` for information on the output format.
date and time string. This flag also can set the format string to apply when
translating the date to human readable format. For a list of available pattern
letters see the [`dateformat` documentation](https://www.npmjs.com/package/dateformat).
- The default format is `yyyy-mm-dd HH:MM:ss.l o` in UTC.
- Require a `SYS:` prefix to translate time to the local system's timezone. A
shortcut `SYS:standard` to translate time to `yyyy-mm-dd HH:MM:ss.l o` in
system timezone.
+ `--search` (`-s`): Specifiy a search pattern according to
[jmespath](http://jmespath.org/).

Expand Down Expand Up @@ -117,11 +115,9 @@ with keys corresponding to the options described in [CLI Arguments](#cliargs):
{
colorize: false, // --colorize
crlf: false, // --crlf
dateFormat: 'yyyy-mm-dd HH:MM:ss.l o', // --dateFormat
errorLikeObjectKeys: ['err', 'error'], // --errorLikeObjectKeys
errorProps: '', // --errorProps
levelFirst: false, // --levelFirst
localTime: false, // --localTime
messageKey: 'msg', // --messageKey
translateTime: false // --translateTime
search: 'foo == `bar`' // --search
Expand Down

0 comments on commit 4a06388

Please sign in to comment.