mirror of
https://github.com/fumiama/terasu-cloudflared.git
synced 2026-06-12 22:40:32 +08:00
TUN-3140: Add timestamps to terminal log entries
This commit is contained in:
@@ -114,10 +114,12 @@ func New(opts ...Option) (Service, error) {
|
||||
}
|
||||
|
||||
if !config.terminalOutputDisabled {
|
||||
terminalFormatter := NewTerminalFormatter(time.RFC3339)
|
||||
|
||||
if len(config.supportedTerminalLevels) == 0 {
|
||||
l.Add(os.Stderr, NewTerminalFormatter(""), InfoLevel, ErrorLevel, FatalLevel)
|
||||
l.Add(os.Stderr, terminalFormatter, InfoLevel, ErrorLevel, FatalLevel)
|
||||
} else {
|
||||
l.Add(os.Stderr, NewTerminalFormatter(""), config.supportedTerminalLevels...)
|
||||
l.Add(os.Stderr, terminalFormatter, config.supportedTerminalLevels...)
|
||||
}
|
||||
}
|
||||
return l, nil
|
||||
|
||||
Reference in New Issue
Block a user