Skip to content

Commit 16a979f

Browse files
committed
force logs as json
1 parent ce4a8ea commit 16a979f

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

command/daemon/daemon.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ func setupLogger(config Config) {
266266
if config.Trace {
267267
logrus.SetLevel(logrus.TraceLevel)
268268
}
269+
logrus.SetFormatter(&logrus.JSONFormatter{})
269270
}
270271

271272
// Register the daemon command.

command/exec.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,8 @@ func (c *execCommand) run(*kingpin.ParseContext) error {
222222
if c.Trace {
223223
logrus.SetLevel(logrus.TraceLevel)
224224
}
225+
logrus.SetFormatter(&logrus.JSONFormatter{})
226+
225227
logger.Default = logger.Logrus(
226228
logrus.NewEntry(
227229
logrus.StandardLogger(),

0 commit comments

Comments
 (0)