Get file.log path as join of its name and LOGS_DIRECTORY env var.
This commit is contained in:
parent
deed268b4f
commit
470bbb04ee
@ -55,7 +55,8 @@ func main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
logFile, err := logging.New(config.Log.File)
|
logFilePath := path.Join(os.Getenv("LOGS_DIRECTORY"), "file.log")
|
||||||
|
logFile, err := logging.New(logFilePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalln("file logger:", err)
|
log.Fatalln("file logger:", err)
|
||||||
}
|
}
|
||||||
@ -107,7 +108,7 @@ func main() {
|
|||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case <-logReopenSignal:
|
case <-logReopenSignal:
|
||||||
logFile.Reopen(config.Log.File)
|
logFile.Reopen(logFilePath)
|
||||||
case <-uploadDirNotify:
|
case <-uploadDirNotify:
|
||||||
uploadDirSize, err = utils.DirectorySize(config.Uploads.Directory)
|
uploadDirSize, err = utils.DirectorySize(config.Uploads.Directory)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user