Skip to content

Commit ed39aed

Browse files
author
Andrey Bardin
committed
logger: switch to syscall.Dup3
1 parent 3bbee0e commit ed39aed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/common/logger.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func InitLoggers(logFile string) {
5959
for _, l := range loggers {
6060
l.Out = file
6161
}
62-
err = syscall.Dup2(int(file.Fd()), int(os.Stderr.Fd()))
62+
err = syscall.Dup3(int(file.Fd()), int(os.Stderr.Fd()), 0)
6363
if err != nil {
6464
log.Errorf("Couldn't redirect STDERR to the log file %v", logFile)
6565
return

0 commit comments

Comments
 (0)