Update
This commit is contained in:
parent
2540e7524a
commit
ec0421000f
@ -173,11 +173,11 @@ func GetAdmin() []int64 {
|
||||
return result
|
||||
}
|
||||
func InitLogger() {
|
||||
if !PathExists("./log/") {
|
||||
os.Mkdir("./log/", 0773)
|
||||
if !PathExists(bLogBasePath) {
|
||||
os.Mkdir(bLogBasePath, 0773)
|
||||
}
|
||||
|
||||
path := "./log/" + time.Now().Format("2006-01-02") + ".log"
|
||||
path := bLogBasePath + time.Now().Format("2006-01-02") + ".log"
|
||||
f, err := os.OpenFile(path, os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0773)
|
||||
if err != nil {
|
||||
logger.Println(err)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user