MCPcopy
hub / github.com/safing/portmaster / writeLogLevelChange

Function writeLogLevelChange

base/log/output.go:86–106  ·  view source on GitHub ↗
(from, to string)

Source from the content-addressed store, hash-verified

84}
85
86func writeLogLevelChange(from, to string) {
87 if GlobalWriter == nil {
88 return
89 }
90 if GlobalWriter.isStdout {
91 fmt.Fprintf(GlobalWriter, "%s%s%s log level changed from %s%s%s to %s%s%s\n",
92 dimColor(),
93 time.Now().Format(timeFormat),
94 endDimColor(),
95
96 blueColor(),
97 from,
98 endColor(),
99
100 blueColor(),
101 to,
102 endColor())
103 } else {
104 fmt.Fprintf(GlobalWriter, "%s log level changed from %s to %s\n", time.Now().Format(timeFormat), from, to)
105 }
106}
107
108func writerManager() {
109 defer shutdownWaitGroup.Done()

Callers 1

SetLogLevelFunction · 0.85

Calls 5

dimColorFunction · 0.70
endDimColorFunction · 0.70
blueColorFunction · 0.70
endColorFunction · 0.70
FormatMethod · 0.45

Tested by

no test coverage detected