xmtop/logging/logging_other.go
寻觅 9dcbd2a48e
Some checks failed
Build Go binaries / build (push) Has been cancelled
[修复] 更新依赖, 修复龙架构无法正常编译的问题
2024-09-13 15:08:35 +08:00

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)
}
}