17 lines
263 B
Go
17 lines
263 B
Go
// +build linux,!arm64 openbsd,!arm64 freebsd darwin
|
|
|
|
package logging
|
|
|
|
import (
|
|
"os"
|
|
"log"
|
|
"golang.org/x/sys/unix"
|
|
)
|
|
|
|
func stderrToLogfile(logfile *os.File) {
|
|
err := unix.Dup2(int(logfile.Fd()), 2)
|
|
if err != nil {
|
|
log.Printf("log错误: ", err)
|
|
}
|
|
}
|