redirectStderr to the file passed in
()
| 26 | |
| 27 | // redirectStderr to the file passed in |
| 28 | func init() { |
| 29 | logFile := initFatalLog() |
| 30 | if logFile != nil { |
| 31 | err := setStdHandle(syscall.STD_ERROR_HANDLE, syscall.Handle(logFile.Fd())) |
| 32 | if err != nil { |
| 33 | log.Fatalf("Failed to redirect stderr to file: %v", err) |
| 34 | } |
| 35 | // SetStdHandle does not affect prior references to stderr |
| 36 | os.Stderr = logFile |
| 37 | } |
| 38 | } |
nothing calls this directly
no test coverage detected