mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-09-29 13:51:51 +02:00
cmd/cli: ensure log time field is formated with ms
This commit is contained in:
1 parent
0bb8703f78
commit
874ff01ab8
1 file changed
+2
-1
+2
-1
@@ -98,6 +98,7 @@ func initConsoleLogging() {
|
|||||||
|
|
||||||
// initLogging initializes global logging setup.
|
// initLogging initializes global logging setup.
|
||||||
func initLogging() {
|
func initLogging() {
|
||||||
|
zerolog.TimeFieldFormat = time.RFC3339 + ".000"
|
||||||
initLoggingWithBackup(true)
|
initLoggingWithBackup(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -136,7 +137,7 @@ func initLoggingWithBackup(doBackup bool) {
|
|||||||
}
|
}
|
||||||
writers = append(writers, consoleWriter)
|
writers = append(writers, consoleWriter)
|
||||||
multi := zerolog.MultiLevelWriter(writers...)
|
multi := zerolog.MultiLevelWriter(writers...)
|
||||||
l := mainLog.Load().Output(multi).With().Timestamp().Logger()
|
l := mainLog.Load().Output(multi).With().Logger()
|
||||||
mainLog.Store(&l)
|
mainLog.Store(&l)
|
||||||
// TODO: find a better way.
|
// TODO: find a better way.
|
||||||
ctrld.ProxyLogger.Store(&l)
|
ctrld.ProxyLogger.Store(&l)
|
||||||
|
|||||||
Reference in new issue
Block a user