()
| 102 | } |
| 103 | |
| 104 | func 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 | } |
nothing calls this directly
no test coverage detected