***
This commit is contained in:
1 parent
e08e9579bd
commit
ab16df5cb6
5 files changed
+92
-5
No files matched your search
@@ -131,7 +131,7 @@ func (l *Logger) writeLogFile(logStr string) {
|
||||
logStr = strings.ReplaceAll(logStr, v, "")
|
||||
}
|
||||
if l.File == nil {
|
||||
file, err := os.OpenFile("./"+l.AppName+".log", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0644)
|
||||
file, err := os.OpenFile("./log/"+l.AppName+".log", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0644)
|
||||
if err != nil {
|
||||
fmt.Printf(RED+"open new log file error: %v\n"+RESET, err)
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user