Documentation
¶
Overview ¶
Package logflag provides command line flag "-log" to setup default logrus logger.
Simply import package and call
logflag.Parse()
after
flag.Parse()
This adds a "-log" multivalue flag to your command line with the following possible values:
- debug, info, warn, error, fatal: logging level
- color: force logrus to color output (text formatter)
- nocolor: force logrus NOT to color output (text formatter)
- json : use logrus.JSONFormatter to output logs in JSON format
Command line examples:
command -log debug,json command -log nocolor,warn command -log info -log color
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.