在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:trevoro/bash-bunyan开源软件地址:https://github.com/trevoro/bash-bunyan开源编程语言:Shell 100.0%开源软件介绍:Bash-BunyanThis tool is based off trentms excellent node-bunyan utility. It's used for creating structured logs using the JSON format. The output is JSON which can be piped to either the 'bunyan' tool itself, or to another JSON parser or to a file. UsageTo use bash-bunyan in your bash script, source the 'bunyan' script then use one of the level names to log directly. ex:
LevelsWhen you include bunyan you will automatically inherit functions which correspond to the log levels. These functions are
To change the loglevel set the '__bunyanLevel to the appropriate level you care about. Anything under that level will not be logged. By default, the level is set to 'info'. Settingsbash-bunyan doesn't have nearly the granularity of node-bunyan, but you can set the name of the process reported in bunyan by setting the '__bunyanName' variable. This variable will be set automatically in your script when you source the bunyan include file. ex:
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论