1
0

Get file.log path as join of its name and LOGS_DIRECTORY env var.

This commit is contained in:
Alexander Andreev 2023-05-24 22:10:57 +04:00
parent deed268b4f
commit 470bbb04ee
Signed by: Arav
GPG Key ID: D22A817D95815393

View File

@ -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 {
log.Fatalln("file logger:", err)
}
@ -107,7 +108,7 @@ func main() {
for {
select {
case <-logReopenSignal:
logFile.Reopen(config.Log.File)
logFile.Reopen(logFilePath)
case <-uploadDirNotify:
uploadDirSize, err = utils.DirectorySize(config.Uploads.Directory)
if err != nil {