Skip to content

Commit

Permalink
Added documentation for -o and --template
Browse files Browse the repository at this point in the history
  • Loading branch information
Neamar committed Nov 25, 2014
1 parent f7f1952 commit f4caf15
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
8 changes: 8 additions & 0 deletions bin/bunyan
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,14 @@ function printHelp() {
p(' bunyan: 0 indented JSON, bunyan\'s native format');
p(' inspect: node.js `util.inspect` output');
p(' short: like "long", but more concise');
p(' custom: use custom template defined with --template');
p(' -t, --template TEMPLATE');
p(' Custom template (you need to set -o custom)');
p(' Let you define your own templates, using mustache-like syntax.');
p(' Keys from the current object will be the template free variable.');
p(' You can put arbitrary code between {{ }}.');
p(' Use _cS to start a color, and _cE to stop a color.');
p(' Example: {{ _cS(\'grey\') }}{{ req.username }}{{ _cE(\'grey\') }}');
p(' -j shortcut for `-o json`');
p(' -0 shortcut for `-o bunyan`');
p('');
Expand Down
14 changes: 4 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,13 @@
"bin": {
"bunyan": "./bin/bunyan"
},

"repository": {
"type": "git",
"url": "git://github.com/trentm/node-bunyan.git"
},
"engines": [
"node >=0.8.0"
],
"keywords": [
"log",
"logging",
"log4j",
"json",
"bunyan"
],
"engines": ["node >=0.8.0"],
"keywords": ["log", "logging", "log4j", "json", "bunyan"],
"// comment1": "'dtrace-provider' required for dtrace features",
"// comment2": "'underscore' required for custom templating in Bunyan CLI",
"// comment3": "'mv' required for RotatingFileStream",
Expand All @@ -35,6 +28,7 @@
"verror": "1.3.3",
"vasync": "1.4.3"
},

"scripts": {
"test": "make test"
}
Expand Down

0 comments on commit f4caf15

Please sign in to comment.