mirror of
https://github.com/zrepl/zrepl.git
synced 2025-08-14 00:58:24 +02:00
cmd: configurable logrus formatters
We lost the nice context-stack [jobname][taskname][...] at the beginning of each log line when switching to logrus. Define some field names that define these contexts. Write a human-friendly formatter that presents these field names like the solution we had before logrus. Write some other formatters for logfmt and json output along the way. Limit ourselves to stdout logging for now.
This commit is contained in:
@ -65,7 +65,7 @@ func init() {
|
||||
func testCmdGlobalInit(cmd *cobra.Command, args []string) {
|
||||
|
||||
log := logrus.New()
|
||||
log.Formatter = CLIFormatter{}
|
||||
log.Formatter = NoFormatter{}
|
||||
testCmdGlobal.log = log
|
||||
|
||||
var err error
|
||||
|
Reference in New Issue
Block a user