mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2024-04-21 12:32:08 +00:00
chore (log): simplify init logic
This commit is contained in:
@@ -17,8 +17,7 @@ var logfile *os.File
|
||||
|
||||
func init() {
|
||||
var err error
|
||||
logPath := GetAbsolutePath(LOG_PATH)
|
||||
logfile, err = os.OpenFile(GetAbsolutePath(logPath, "access.log"), os.O_APPEND|os.O_WRONLY|os.O_CREATE, os.ModePerm)
|
||||
logfile, err = os.OpenFile(GetAbsolutePath(LOG_PATH, "access.log"), os.O_APPEND|os.O_WRONLY|os.O_CREATE, os.ModePerm)
|
||||
if err != nil {
|
||||
slog.Printf("ERROR log file: %+v", err)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user