MCPcopy Index your code
hub / github.com/foxcpp/maddy / reinitLogging

Function reinitLogging

config.go:104–122  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

102}
103
104func reinitLogging() {
105 out, ok := log.DefaultLogger.Out.(logOut)
106 if !ok {
107 log.Println("Can't reinitialize logger because it was replaced before, this is a bug")
108 return
109 }
110
111 newOut, err := LogOutputOption(out.args)
112 if err != nil {
113 log.Println("Can't reinitialize logger:", err)
114 return
115 }
116
117 if err := out.Close(); err != nil {
118 log.Println("Can't close old logger:", err)
119 }
120
121 log.DefaultLogger.Out = newOut
122}

Callers

nothing calls this directly

Calls 3

PrintlnFunction · 0.92
LogOutputOptionFunction · 0.85
CloseMethod · 0.65

Tested by

no test coverage detected