Commit aa60a45eecb42ae6216e3eb53d0a876abb64b082

Authored by Marko Tikvić
1 parent 98cf2ceebd
Exists in master

changed log file signature

Showing 1 changed file with 3 additions and 1 deletions   Show diff stats
... ... @@ -5,6 +5,7 @@ import (
5 5 "os"
6 6 "path/filepath"
7 7 "runtime"
  8 + "strings"
8 9 "sync"
9 10 "time"
10 11 )
... ... @@ -41,7 +42,8 @@ func New(name string, maxFileSize int64) (logger *Logger, err error) {
41 42 }
42 43 }
43 44  
44   - timestamp := "_" + time.Now().Format(time.RFC3339)
  45 + date := strings.Split(time.Now().Format(time.RFC3339), "T")[0]
  46 + timestamp := "_" + date
45 47 path := filepath.Join(logDirName, logger.outputFileName+timestamp+".txt")
46 48 logger.outputFile, err = os.Create(path)
47 49 if err != nil {
... ...