MCPcopy Create free account
hub / github.com/Monibuca/engine / init

Function init

util/stderr_windows.go:28–38  ·  view source on GitHub ↗

redirectStderr to the file passed in

()

Source from the content-addressed store, hash-verified

26
27// redirectStderr to the file passed in
28func 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}

Callers

nothing calls this directly

Calls 3

initFatalLogFunction · 0.85
setStdHandleFunction · 0.85
HandleMethod · 0.65

Tested by

no test coverage detected