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 6.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. .\" generated with Ronn/v0.7.3
  2. .\" http://github.com/rtomayko/ronn/tree/0.7.3
  3. .
  4. .TH "BUNYAN" "1" "January 2015" "" "bunyan manual"
  5. .
  6. .SH "NAME"
  7. \fBbunyan\fR \- filter and pretty\-print Bunyan log file content
  8. .
  9. .SH "SYNOPSIS"
  10. \fBbunyan\fR [OPTIONS]
  11. .
  12. .P
  13. \&\.\.\. | \fBbunyan\fR [OPTIONS]
  14. .
  15. .P
  16. \fBbunyan\fR [OPTIONS] \-p PID
  17. .
  18. .SH "DESCRIPTION"
  19. "Bunyan" is \fBa simple and fast a JSON logging library\fR for node\.js services, a one\-JSON\-object\-per\-line log format, and \fBa \fBbunyan\fR CLI tool\fR for nicely viewing those logs\. This man page describes the latter\.
  20. .
  21. .SS "Pretty\-printing"
  22. A bunyan log file is a stream of JSON objects, optionally interspersed with non\-JSON log lines\. The primary usage of bunyan(1) is to pretty print, for example:
  23. .
  24. .IP "" 4
  25. .
  26. .nf
  27. $ bunyan foo\.log # or `cat foo\.log | bunyan
  28. [2012\-02\-08T22:56:52\.856Z] INFO: myservice/123 on example\.com: My message
  29. extra: multi
  30. line
  31. [2012\-02\-08T22:56:54\.856Z] ERROR: myservice/123 on example\.com: My message
  32. \.\.\.
  33. .
  34. .fi
  35. .
  36. .IP "" 0
  37. .
  38. .P
  39. By default the "long" output format is used\. Use the \fB\-o FORMAT\fR option to emit other formats\. E\.g\.:
  40. .
  41. .IP "" 4
  42. .
  43. .nf
  44. $ bunyan foo\.log \-o short
  45. 22:56:52\.856Z INFO myservice: My message
  46. extra: multi
  47. line
  48. 22:56:54\.856Z ERROR myservice: My message
  49. \.\.\.
  50. .
  51. .fi
  52. .
  53. .IP "" 0
  54. .
  55. .P
  56. These will color the output if supported in your terminal\. See "OUTPUT FORMATS" below\.
  57. .
  58. .SS "Filtering"
  59. The \fBbunyan\fR CLI can also be used to filter a bunyan log\. Use \fB\-l LEVEL\fR to filter by level:
  60. .
  61. .IP "" 4
  62. .
  63. .nf
  64. $ bunyan foo\.log \-l error # show only \'error\' level records
  65. [2012\-02\-08T22:56:54\.856Z] ERROR: myservice/123 on example\.com: My message
  66. .
  67. .fi
  68. .
  69. .IP "" 0
  70. .
  71. .P
  72. Use \fB\-c COND\fR to filter on a JavaScript expression returning true on the record data\. In the COND code, \fBthis\fR refers to the record object:
  73. .
  74. .IP "" 4
  75. .
  76. .nf
  77. $ bunyan foo\.log \-c `this\.three` # show records with the \'extra\' field
  78. [2012\-02\-08T22:56:52\.856Z] INFO: myservice/123 on example\.com: My message
  79. extra: multi
  80. line
  81. .
  82. .fi
  83. .
  84. .IP "" 0
  85. .
  86. .SH "OPTIONS"
  87. .
  88. .TP
  89. \fB\-h\fR, \fB\-\-help\fR
  90. Print this help info and exit\.
  91. .
  92. .TP
  93. \fB\-\-version\fR
  94. Print version of this command and exit\.
  95. .
  96. .TP
  97. \fB\-q\fR, \fB\-\-quiet\fR
  98. Don\'t warn if input isn\'t valid JSON\.
  99. .
  100. .P
  101. Dtrace options (only on dtrace\-supporting platforms):
  102. .
  103. .TP
  104. \fB\-p PID\fR, \fB\-p NAME\fR
  105. Process bunyan:log\-* probes from the process with the given PID\. Can be used multiple times, or specify all processes with \'*\', or a set of processes whose command & args match a pattern with \'\-p NAME\'\.
  106. .
  107. .P
  108. Filtering options:
  109. .
  110. .TP
  111. \fB\-l\fR, \fB\-\-level LEVEL\fR
  112. Only show messages at or above the specified level\. You can specify level \fInames\fR or numeric values\. (See \'Log Levels\' below\.)
  113. .
  114. .TP
  115. \fB\-c COND\fR, \fB\-\-condition COND\fR
  116. Run each log message through the condition and only show those that resolve to a truish value\. E\.g\. \fB\-c \'this\.pid == 123\'\fR\.
  117. .
  118. .TP
  119. \fB\-\-strict\fR
  120. Suppress all but legal Bunyan JSON log lines\. By default non\-JSON, and non\-Bunyan lines are passed through\.
  121. .
  122. .P
  123. Output options:
  124. .
  125. .TP
  126. \fB\-\-color\fR
  127. Colorize output\. Defaults to try if output stream is a TTY\.
  128. .
  129. .TP
  130. \fB\-\-no\-color\fR
  131. Force no coloring (e\.g\. terminal doesn\'t support it)
  132. .
  133. .TP
  134. \fB\-o FORMAT\fR, \fB\-\-output FORMAT\fR
  135. Specify an output format\. One of \fBlong\fR (the default), \fBshort\fR, \fBjson\fR, \fBjson\-N\fR, \fBbunyan\fR (the native bunyan 0\-indent JSON output) or \fBinspect\fR\.
  136. .
  137. .TP
  138. \fB\-j\fR
  139. Shortcut for \fB\-o json\fR\.
  140. .
  141. .TP
  142. \fB\-L\fR, \fB\-\-time local\fR
  143. Display the time field in \fIlocal\fR time, rather than the default UTC time\.
  144. .
  145. .SH "LOG LEVELS"
  146. In Bunyan log records, then \fBlevel\fR field is a number\. For the \fB\-l|\-\-level\fR argument the level \fBnames\fR are supported as shortcuts\. In \fB\-c|\-\-condition\fR scripts, uppercase symbols like "DEBUG" are defined for convenience\.
  147. .
  148. .IP "" 4
  149. .
  150. .nf
  151. Level Name Level Number Symbol in COND Scripts
  152. trace 10 TRACE
  153. debug 20 DEBUG
  154. info 30 INFO
  155. warn 40 WARN
  156. error 50 ERROR
  157. fatal 60 FATAL
  158. .
  159. .fi
  160. .
  161. .IP "" 0
  162. .
  163. .SH "OUTPUT FORMATS"
  164. .
  165. .nf
  166. FORMAT NAME DESCRIPTION
  167. long (default) The default output\. Long form\. Colored and "pretty"\.
  168. \'req\' and \'res\' and \'err\' fields are rendered specially
  169. as an HTTP request, HTTP response and exception
  170. stack trace, respectively\. For backward compat, the
  171. name "paul" also works for this\.
  172. short Like the default output, but more concise\. Some
  173. typically redundant fields are ellided\.
  174. json JSON output, 2\-space indentation\.
  175. json\-N JSON output, N\-space indentation, e\.g\. "json\-4"
  176. bunyan Alias for "json\-0", the Bunyan "native" format\.
  177. inspect Node\.js `util\.inspect` output\.
  178. .
  179. .fi
  180. .
  181. .SH "DTRACE SUPPORT"
  182. On systems that support DTrace (e\.g\., MacOS, FreeBSD, illumos derivatives like SmartOS and OmniOS), Bunyan will create a DTrace provider (\fBbunyan\fR) that makes available the following probes:
  183. .
  184. .IP "" 4
  185. .
  186. .nf
  187. log\-trace
  188. log\-debug
  189. log\-info
  190. log\-warn
  191. log\-error
  192. log\-fatal
  193. .
  194. .fi
  195. .
  196. .IP "" 0
  197. .
  198. .P
  199. Each of these probes has a single argument: the string that would be written to the log\. Note that when a probe is enabled, it will fire whenever the corresponding function is called, even if the level of the log message is less than that of any stream\.
  200. .
  201. .P
  202. See \fIhttps://github\.com/trentm/node\-bunyan#dtrace\-support\fR for more details and the \'\-p PID\' option above for convenience usage\.
  203. .
  204. .SH "ENVIRONMENT"
  205. .
  206. .TP
  207. \fBBUNYAN_NO_COLOR\fR
  208. Set to a non\-empty value to force no output coloring\. See \'\-\-no\-color\'\.
  209. .
  210. .SH "PROJECT & BUGS"
  211. \fBbunyan\fR is written in JavaScript and requires node\.js (\fBnode\fR)\. The project lives at \fIhttps://github\.com/trentm/node\-bunyan\fR and is published to npm as "bunyan"\.
  212. .
  213. .IP "\(bu" 4
  214. README, Install notes: \fIhttps://github\.com/trentm/node\-bunyan#readme\fR
  215. .
  216. .IP "\(bu" 4
  217. Report bugs to \fIhttps://github\.com/trentm/node\-bunyan/issues\fR\.
  218. .
  219. .IP "\(bu" 4
  220. See the full changelog at: \fIhttps://github\.com/trentm/node\-bunyan/blob/master/CHANGES\.md\fR
  221. .
  222. .IP "" 0
  223. .
  224. .SH "LICENSE"
  225. MIT License (see \fIhttps://github\.com/trentm/node\-bunyan/blob/master/LICENSE\.txt\fR)
  226. .
  227. .SH "COPYRIGHT"
  228. node\-bunyan is Copyright (c) 2012 Joyent, Inc\. Copyright (c) 2012 Trent Mick\. All rights reserved\.