Command line interface for oddlog.
Last updated 2 years ago by frissdiegurke .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install oddlog-cli -g
SYNC missed versions from official npm registry.

oddlog CLI

License Version build status Downloads

This is the command-line interface for oddlog.


Preview 01


Usage: oddlog [options]
oddlog reads from stdin and outputs to stdout.

Message filter options:
  -l, --level                Filter messages with given level and above.[string]
  -a, --application, --name  Filter messages by application name. The ns-matcher
                             package is used for matching; See
                             https://www.npmjs.com/package/ns-matcher#examples .
                             This allows advanced and multiple (ordered) glob
                             patterns. This option can also be set via the
                             environment variable DEBUG.                 [array]
  -d, --date                 Filter messages by date or time. The accepted
                             format is based on the ISO format
                             YYYY-MM-DDTHH:mm:ss.sTZD. Parts of this can be
                             omitted. The T can be replaced with whitespace as
                             well. If no TZD is provided, local timezone will be
                             used. Valid examples include '16-1-1' (anything on
                             the 1st January of **16), '1 12Z' (anything on the
                             1st of any month at [12:00,13:00) in UTC) and
                             'T12:0+2:4' (anything on any day at [12:00,13:00)
                             in timezone +02:04).                       [string]

Output options:
  -e, --encoding                 Set encoding format.          [default: "utf8"]
  -v, --verbose                  Increase verbosity for all levels that ain't
                                 overwritten by level specific verbosity
                                 options. This is equal to set verbosity-silent,
                                 but with counted value.                 [count]
  -i, --invalid                  Pass lines that cannot be interpreted as oddlog
                                 messages to stdout.                   [boolean]
  -o, --format                   Select a pre-defined format.
                          [choices: "csv", "json", "pretty"] [default: "pretty"]
  -s, --style                    The style variant for the format.
                                [choices: "default", "module", "decent", "none"]
  --iso-date                     Use the ISO date format.              [boolean]
  -n, --newline                  Separate records with an empty line.  [boolean]
  --LS, --line-separator, --EOL  Specify a line-separator.           [default: EOL]

CSV format options:
  --FS, --field-separator  Specify a field-separator for csv output
                                                                  [default: ","]

Level specific verbosity options:
  -S, --verbosity-silent   Set the verbosity of the level SILENT and above.
  -T, --verbosity-trace    Set the verbosity of the level TRACE and above.
  -D, --verbosity-debug    Set the verbosity of the level DEBUG and above.
  -V, --verbosity-verbose  Set the verbosity of the level VERBOSE and above.
  -I, --verbosity-info     Set the verbosity of the level INFO and above.
  -W, --verbosity-warn     Set the verbosity of the level WARN and above.
  -E, --verbosity-error    Set the verbosity of the level ERROR and above.
  -F, --verbosity-fatal    Set the verbosity of the level FATAL and above.

  -m, --module  Use a node.js module to modify behavior.                [string]
  -h, --help    Show this help message.                                [boolean]
  --config      Path to JSON config file
  --version     Show version number                                    [boolean]

  tail -f logs/my-logs.log | oddlog         Output formatted logs as they get
  cat log | oddlog -a 'myApp/*'             Filter for messages with logger name
  '!myApp/void'                             prefix myApp/ but not myApp/void.
  cat log | oddlog -d                       Filter for messages with exact iso
  '2016-12-14T16:20:45.895Z' -vvvvv         date match. Display with highest
  cat log | oddlog -d '12-14 16:20'         Filter for messages within the
                                            minute of 16:20 on the 14th of
                                            december of any year.
  cat log | oddlog -d '03:21:45.895'        Filter for messages with exact local
                                            time match.


The source code is licensed under MIT. If you don't agree to the license, you may not contribute to the project. Feel free to fork and maintain your custom build thought.

Current Tags

  • 0.7.1                                ...           latest (2 years ago)

24 Versions

  • 0.7.1                                ...           2 years ago
  • 0.7.0                                ...           2 years ago
  • 0.6.1                                ...           2 years ago
  • 0.6.0                                ...           3 years ago
  • 0.5.1                                ...           3 years ago
  • 0.5.0                                ...           3 years ago
  • 0.4.1                                ...           3 years ago
  • 0.4.0                                ...           3 years ago
  • 0.3.2                                ...           4 years ago
  • 0.3.1                                ...           4 years ago
  • 0.3.0                                ...           4 years ago
  • 0.2.4                                ...           4 years ago
  • 0.2.3                                ...           4 years ago
  • 0.2.2                                ...           4 years ago
  • 0.2.1                                ...           4 years ago
  • 0.2.0                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
  • 0.1.0-beta.6                                ...           4 years ago
  • 0.1.0-beta.5                                ...           4 years ago
  • 0.1.0-beta.4                                ...           4 years ago
  • 0.1.0-beta.3                                ...           4 years ago
  • 0.1.0-beta.2                                ...           4 years ago
  • 0.1.0-beta.1                                ...           4 years ago
  • 0.1.0-alpha.1                                ...           4 years ago
Maintainers (2)
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 26
Dependencies (3)
Dev Dependencies (3)
Dependents (0)

Copyright 2014 - 2016 © taobao.org |