mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-12 05:37:32 +00:00
logpolicy: add debug knob to force logging time to terminal
This commit is contained in:
@@ -315,6 +315,9 @@ func New(collection string) *Policy {
|
|||||||
} else {
|
} else {
|
||||||
lflags = log.LstdFlags
|
lflags = log.LstdFlags
|
||||||
}
|
}
|
||||||
|
if v, _ := strconv.ParseBool(os.Getenv("TS_DEBUG_LOG_TIME")); v {
|
||||||
|
lflags = log.LstdFlags | log.Lmicroseconds
|
||||||
|
}
|
||||||
if runningUnderSystemd() {
|
if runningUnderSystemd() {
|
||||||
// If journalctl is going to prepend its own timestamp
|
// If journalctl is going to prepend its own timestamp
|
||||||
// anyway, no need to add one.
|
// anyway, no need to add one.
|
||||||
|
Reference in New Issue
Block a user