feat add log date
This commit is contained in:
parent
bbc94e0375
commit
bf700eeeb3
1
main.go
1
main.go
|
@ -22,6 +22,7 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
config := cfg.NewConfig(envFile)
|
config := cfg.NewConfig(envFile)
|
||||||
|
log.SetFlags(log.Ldate)
|
||||||
log.SetFlags(log.Lmicroseconds)
|
log.SetFlags(log.Lmicroseconds)
|
||||||
if config.LogFile {
|
if config.LogFile {
|
||||||
logFileName := fmt.Sprintf("%s.txt", time.Now().Format(strings.ReplaceAll(time.RFC1123Z, ":", "_")))
|
logFileName := fmt.Sprintf("%s.txt", time.Now().Format(strings.ReplaceAll(time.RFC1123Z, ":", "_")))
|
||||||
|
|
Loading…
Reference in New Issue