Skip to content

Commit 1b653cb

Browse files
committed
force logs as json
1 parent 9e8d0d4 commit 1b653cb

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
@@ -275,6 +275,7 @@ func setupLogger(config Config) {
275275
if config.Trace {
276276
logrus.SetLevel(logrus.TraceLevel)
277277
}
278+
logrus.SetFormatter(&logrus.JSONFormatter{})
278279
}
279280

280281
// Register the daemon command.

command/exec.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,8 @@ func (c *execCommand) run(*kingpin.ParseContext) error {
224224
if c.Trace {
225225
logrus.SetLevel(logrus.TraceLevel)
226226
}
227+
logrus.SetFormatter(&logrus.JSONFormatter{})
228+
227229
logger.Default = logger.Logrus(
228230
logrus.NewEntry(
229231
logrus.StandardLogger(),

0 commit comments

Comments
 (0)