Expose log/LogRedirectStdOutToFile

This commit is contained in:
Dolf Schimmel (Freeaqingme)
2016-06-18 21:00:15 +02:00
parent 3267505a4b
commit 419d418537

View File

@@ -49,13 +49,13 @@ func Reopen(args string) {
return return
} }
Log.Notice("Reopening log file per IPC request...") Log.Notice("Reopening log file per IPC request...")
logRedirectStdOutToFile(logFile) LogRedirectStdOutToFile(logFile)
Log.Notice("Reopened log file per IPC request") Log.Notice("Reopened log file per IPC request")
} }
// If there are any existing fd's (e.g. we're reopening logs), we rely // If there are any existing fd's (e.g. we're reopening logs), we rely
// on garbage collection to clean them up for us. // on garbage collection to clean them up for us.
func logRedirectStdOutToFile(logPath string) { func LogRedirectStdOutToFile(logPath string) {
if logPath == "" { if logPath == "" {
Log.Fatal("Log Path not set") Log.Fatal("Log Path not set")
} }