Skip to content

Commit

Permalink
Loggers: use log format rather than terminal format for files
Browse files Browse the repository at this point in the history
  • Loading branch information
BedrockSquirrel committed Jan 17, 2024
1 parent 0198095 commit 2565823
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion go/common/log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func New(component string, level int, out string, ctx ...interface{}) gethlog.Lo
if out == SysOut {
s = gethlog.StreamHandler(os.Stdout, gethlog.TerminalFormat(false))
} else {
s1, err := gethlog.FileHandler(out, gethlog.TerminalFormat(false))
s1, err := gethlog.FileHandler(out, gethlog.LogfmtFormat())
if err != nil {
panic(err)
}
Expand Down
2 changes: 1 addition & 1 deletion integration/common/testlog/testlog.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func Setup(cfg *Cfg) *os.File {
}
logFile = f.Name()
// hardcode geth log level to error only
gethlog.Root().SetHandler(gethlog.LvlFilterHandler(cfg.LogLevel, gethlog.StreamHandler(f, gethlog.TerminalFormat(false))))
gethlog.Root().SetHandler(gethlog.LvlFilterHandler(cfg.LogLevel, gethlog.StreamHandler(f, gethlog.LogfmtFormat())))
testlog = gethlog.Root().New(log.CmpKey, log.TestLogCmp)
return f
}

0 comments on commit 2565823

Please sign in to comment.