Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

bunyan.1.html 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv='content-type' value='text/html;charset=utf8'>
  5. <meta name='generator' value='Ronn/v0.7.3 (http://github.com/rtomayko/ronn/tree/0.7.3)'>
  6. <title>bunyan(1) - filter and pretty-print Bunyan log file content</title>
  7. <style type='text/css' media='all'>
  8. /* style: man */
  9. body#manpage {margin:0}
  10. .mp {max-width:100ex;padding:0 9ex 1ex 4ex}
  11. .mp p,.mp pre,.mp ul,.mp ol,.mp dl {margin:0 0 20px 0}
  12. .mp h2 {margin:10px 0 0 0}
  13. .mp > p,.mp > pre,.mp > ul,.mp > ol,.mp > dl {margin-left:8ex}
  14. .mp h3 {margin:0 0 0 4ex}
  15. .mp dt {margin:0;clear:left}
  16. .mp dd {margin:0 0 0 9ex}
  17. .mp h1,.mp h2,.mp h3,.mp h4 {clear:left}
  18. .mp pre {margin-bottom:20px}
  19. .mp pre+h2,.mp pre+h3 {margin-top:22px}
  20. .mp h2+pre,.mp h3+pre {margin-top:5px}
  21. .mp img {display:block;margin:auto}
  22. .mp h1.man-title {display:none}
  23. .mp,.mp code,.mp pre,.mp tt,.mp kbd,.mp samp,.mp h3,.mp h4 {font-family:monospace;font-size:14px;line-height:1.42857142857143}
  24. .mp h2 {font-size:16px;line-height:1.25}
  25. .mp h1 {font-size:20px;line-height:2}
  26. .mp {text-align:justify;background:#fff}
  27. .mp,.mp code,.mp pre,.mp pre code,.mp tt,.mp kbd,.mp samp {color:#131211}
  28. .mp h1,.mp h2,.mp h3,.mp h4 {color:#030201}
  29. .mp u {text-decoration:underline}
  30. .mp code,.mp strong,.mp b {font-weight:bold;color:#131211}
  31. .mp em,.mp var {font-style:italic;color:#232221;text-decoration:none}
  32. .mp a,.mp a:link,.mp a:hover,.mp a code,.mp a pre,.mp a tt,.mp a kbd,.mp a samp {color:#0000ff}
  33. .mp b.man-ref {font-weight:normal;color:#434241}
  34. .mp pre {padding:0 4ex}
  35. .mp pre code {font-weight:normal;color:#434241}
  36. .mp h2+pre,h3+pre {padding-left:0}
  37. ol.man-decor,ol.man-decor li {margin:3px 0 10px 0;padding:0;float:left;width:33%;list-style-type:none;text-transform:uppercase;color:#999;letter-spacing:1px}
  38. ol.man-decor {width:100%}
  39. ol.man-decor li.tl {text-align:left}
  40. ol.man-decor li.tc {text-align:center;letter-spacing:4px}
  41. ol.man-decor li.tr {text-align:right;float:right}
  42. </style>
  43. <style type='text/css' media='all'>
  44. /* style: toc */
  45. .man-navigation {display:block !important;position:fixed;top:0;left:113ex;height:100%;width:100%;padding:48px 0 0 0;border-left:1px solid #dbdbdb;background:#eee}
  46. .man-navigation a,.man-navigation a:hover,.man-navigation a:link,.man-navigation a:visited {display:block;margin:0;padding:5px 2px 5px 30px;color:#999;text-decoration:none}
  47. .man-navigation a:hover {color:#111;text-decoration:underline}
  48. </style>
  49. </head>
  50. <!--
  51. The following styles are deprecated and will be removed at some point:
  52. div#man, div#man ol.man, div#man ol.head, div#man ol.man.
  53. The .man-page, .man-decor, .man-head, .man-foot, .man-title, and
  54. .man-navigation should be used instead.
  55. -->
  56. <body id='manpage'>
  57. <div class='mp' id='man'>
  58. <div class='man-navigation' style='display:none'>
  59. <a href="#NAME">NAME</a>
  60. <a href="#SYNOPSIS">SYNOPSIS</a>
  61. <a href="#DESCRIPTION">DESCRIPTION</a>
  62. <a href="#OPTIONS">OPTIONS</a>
  63. <a href="#LOG-LEVELS">LOG LEVELS</a>
  64. <a href="#OUTPUT-FORMATS">OUTPUT FORMATS</a>
  65. <a href="#DTRACE-SUPPORT">DTRACE SUPPORT</a>
  66. <a href="#ENVIRONMENT">ENVIRONMENT</a>
  67. <a href="#PROJECT-BUGS">PROJECT &amp; BUGS</a>
  68. <a href="#LICENSE">LICENSE</a>
  69. <a href="#COPYRIGHT">COPYRIGHT</a>
  70. </div>
  71. <ol class='man-decor man-head man head'>
  72. <li class='tl'>bunyan(1)</li>
  73. <li class='tc'>bunyan manual</li>
  74. <li class='tr'>bunyan(1)</li>
  75. </ol>
  76. <h2 id="NAME">NAME</h2>
  77. <p class="man-name">
  78. <code>bunyan</code> - <span class="man-whatis">filter and pretty-print Bunyan log file content</span>
  79. </p>
  80. <h2 id="SYNOPSIS">SYNOPSIS</h2>
  81. <p><code>bunyan</code> [OPTIONS]</p>
  82. <p>... | <code>bunyan</code> [OPTIONS]</p>
  83. <p><code>bunyan</code> [OPTIONS] -p PID</p>
  84. <h2 id="DESCRIPTION">DESCRIPTION</h2>
  85. <p>"Bunyan" is <strong>a simple and fast a JSON logging library</strong> for node.js services,
  86. a one-JSON-object-per-line log format, and <strong>a <code>bunyan</code> CLI tool</strong> for nicely
  87. viewing those logs. This man page describes the latter.</p>
  88. <h3 id="Pretty-printing">Pretty-printing</h3>
  89. <p>A bunyan log file is a stream of JSON objects, optionally interspersed with
  90. non-JSON log lines. The primary usage of <a href="bunyan.1.html" class="man-ref">bunyan<span class="s">(1)</span></a> is to pretty print,
  91. for example:</p>
  92. <pre><code>$ bunyan foo.log # or `cat foo.log | bunyan
  93. [2012-02-08T22:56:52.856Z] INFO: myservice/123 on example.com: My message
  94. extra: multi
  95. line
  96. [2012-02-08T22:56:54.856Z] ERROR: myservice/123 on example.com: My message
  97. ...
  98. </code></pre>
  99. <p>By default the "long" output format is used. Use the <code>-o FORMAT</code> option to
  100. emit other formats. E.g.:</p>
  101. <pre><code>$ bunyan foo.log -o short
  102. 22:56:52.856Z INFO myservice: My message
  103. extra: multi
  104. line
  105. 22:56:54.856Z ERROR myservice: My message
  106. ...
  107. </code></pre>
  108. <p>These will color the output if supported in your terminal.
  109. See "OUTPUT FORMATS" below.</p>
  110. <h3 id="Filtering">Filtering</h3>
  111. <p>The <code>bunyan</code> CLI can also be used to filter a bunyan log. Use <code>-l LEVEL</code>
  112. to filter by level:</p>
  113. <pre><code>$ bunyan foo.log -l error # show only 'error' level records
  114. [2012-02-08T22:56:54.856Z] ERROR: myservice/123 on example.com: My message
  115. </code></pre>
  116. <p>Use <code>-c COND</code> to filter on a JavaScript expression returning true on the
  117. record data. In the COND code, <code>this</code> refers to the record object:</p>
  118. <pre><code>$ bunyan foo.log -c `this.three` # show records with the 'extra' field
  119. [2012-02-08T22:56:52.856Z] INFO: myservice/123 on example.com: My message
  120. extra: multi
  121. line
  122. </code></pre>
  123. <h2 id="OPTIONS">OPTIONS</h2>
  124. <dl>
  125. <dt><code>-h</code>, <code>--help</code></dt><dd><p>Print this help info and exit.</p></dd>
  126. <dt><code>--version</code></dt><dd><p>Print version of this command and exit.</p></dd>
  127. <dt><code>-q</code>, <code>--quiet</code></dt><dd><p>Don't warn if input isn't valid JSON.</p></dd>
  128. </dl>
  129. <p>Dtrace options (only on dtrace-supporting platforms):</p>
  130. <dl>
  131. <dt><code>-p PID</code>, <code>-p NAME</code></dt><dd>Process bunyan:log-* probes from the process with the given PID.
  132. Can be used multiple times, or specify all processes with '*',
  133. or a set of processes whose command &amp; args match a pattern with
  134. '-p NAME'.</dd>
  135. </dl>
  136. <p>Filtering options:</p>
  137. <dl>
  138. <dt><code>-l</code>, <code>--level LEVEL</code></dt><dd><p>Only show messages at or above the specified level. You can specify level
  139. <em>names</em> or numeric values. (See 'Log Levels' below.)</p></dd>
  140. <dt><code>-c COND</code>, <code>--condition COND</code></dt><dd><p>Run each log message through the condition and only show those that
  141. resolve to a truish value. E.g. <code>-c 'this.pid == 123'</code>.</p></dd>
  142. <dt><code>--strict</code></dt><dd><p>Suppress all but legal Bunyan JSON log lines. By default non-JSON, and
  143. non-Bunyan lines are passed through.</p></dd>
  144. </dl>
  145. <p>Output options:</p>
  146. <dl>
  147. <dt class="flush"><code>--color</code></dt><dd><p>Colorize output. Defaults to try if output stream is a TTY.</p></dd>
  148. <dt><code>--no-color</code></dt><dd><p>Force no coloring (e.g. terminal doesn't support it)</p></dd>
  149. <dt><code>-o FORMAT</code>, <code>--output FORMAT</code></dt><dd><p>Specify an output format. One of <code>long</code> (the default), <code>short</code>, <code>json</code>,
  150. <code>json-N</code>, <code>bunyan</code> (the native bunyan 0-indent JSON output) or <code>inspect</code>.</p></dd>
  151. <dt class="flush"><code>-j</code></dt><dd><p>Shortcut for <code>-o json</code>.</p></dd>
  152. <dt><code>-L</code>, <code>--time local</code></dt><dd><p>Display the time field in <em>local</em> time, rather than the default UTC
  153. time.</p></dd>
  154. </dl>
  155. <h2 id="LOG-LEVELS">LOG LEVELS</h2>
  156. <p>In Bunyan log records, then <code>level</code> field is a number. For the <code>-l|--level</code>
  157. argument the level <strong>names</strong> are supported as shortcuts. In <code>-c|--condition</code>
  158. scripts, uppercase symbols like "DEBUG" are defined for convenience.</p>
  159. <pre><code>Level Name Level Number Symbol in COND Scripts
  160. trace 10 TRACE
  161. debug 20 DEBUG
  162. info 30 INFO
  163. warn 40 WARN
  164. error 50 ERROR
  165. fatal 60 FATAL
  166. </code></pre>
  167. <h2 id="OUTPUT-FORMATS">OUTPUT FORMATS</h2>
  168. <pre><code>FORMAT NAME DESCRIPTION
  169. long (default) The default output. Long form. Colored and "pretty".
  170. 'req' and 'res' and 'err' fields are rendered specially
  171. as an HTTP request, HTTP response and exception
  172. stack trace, respectively. For backward compat, the
  173. name "paul" also works for this.
  174. short Like the default output, but more concise. Some
  175. typically redundant fields are ellided.
  176. json JSON output, 2-space indentation.
  177. json-N JSON output, N-space indentation, e.g. "json-4"
  178. bunyan Alias for "json-0", the Bunyan "native" format.
  179. inspect Node.js `util.inspect` output.
  180. </code></pre>
  181. <h2 id="DTRACE-SUPPORT">DTRACE SUPPORT</h2>
  182. <p>On systems that support DTrace (e.g., MacOS, FreeBSD, illumos derivatives
  183. like SmartOS and OmniOS), Bunyan will create a DTrace provider (<code>bunyan</code>)
  184. that makes available the following probes:</p>
  185. <pre><code>log-trace
  186. log-debug
  187. log-info
  188. log-warn
  189. log-error
  190. log-fatal
  191. </code></pre>
  192. <p>Each of these probes has a single argument: the string that would be
  193. written to the log. Note that when a probe is enabled, it will
  194. fire whenever the corresponding function is called, even if the level of
  195. the log message is less than that of any stream.</p>
  196. <p>See <a href="https://github.com/trentm/node-bunyan#dtrace-support" data-bare-link="true">https://github.com/trentm/node-bunyan#dtrace-support</a> for more details
  197. and the '-p PID' option above for convenience usage.</p>
  198. <h2 id="ENVIRONMENT">ENVIRONMENT</h2>
  199. <dl>
  200. <dt><code>BUNYAN_NO_COLOR</code></dt><dd>Set to a non-empty value to force no output coloring. See '--no-color'.</dd>
  201. </dl>
  202. <h2 id="PROJECT-BUGS">PROJECT &amp; BUGS</h2>
  203. <p><code>bunyan</code> is written in JavaScript and requires node.js (<code>node</code>). The project
  204. lives at <a href="https://github.com/trentm/node-bunyan" data-bare-link="true">https://github.com/trentm/node-bunyan</a> and is published to npm as
  205. "bunyan".</p>
  206. <ul>
  207. <li>README, Install notes: <a href="https://github.com/trentm/node-bunyan#readme" data-bare-link="true">https://github.com/trentm/node-bunyan#readme</a></li>
  208. <li>Report bugs to <a href="https://github.com/trentm/node-bunyan/issues" data-bare-link="true">https://github.com/trentm/node-bunyan/issues</a>.</li>
  209. <li>See the full changelog at: <a href="https://github.com/trentm/node-bunyan/blob/master/CHANGES.md" data-bare-link="true">https://github.com/trentm/node-bunyan/blob/master/CHANGES.md</a></li>
  210. </ul>
  211. <h2 id="LICENSE">LICENSE</h2>
  212. <p>MIT License (see <a href="https://github.com/trentm/node-bunyan/blob/master/LICENSE.txt" data-bare-link="true">https://github.com/trentm/node-bunyan/blob/master/LICENSE.txt</a>)</p>
  213. <h2 id="COPYRIGHT">COPYRIGHT</h2>
  214. <p>node-bunyan is Copyright (c) 2012 Joyent, Inc. Copyright (c) 2012 Trent Mick.
  215. All rights reserved.</p>
  216. <ol class='man-decor man-foot man foot'>
  217. <li class='tl'></li>
  218. <li class='tc'>January 2015</li>
  219. <li class='tr'>bunyan(1)</li>
  220. </ol>
  221. </div>
  222. <a href="https://github.com/trentm/node-bunyan"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a></body>
  223. </html>