Code Refactoring and modifications

This commit is contained in:
balandi1 2019-11-21 18:04:59 -05:00
parent eaac82ceb9
commit 370a490643
9 changed files with 75 additions and 91 deletions

View file

@ -20,6 +20,7 @@ func (logD *logDirectory) createLogDir(prefix string, startTime time.Time) {
if logD.name == "" {
// Creating directory to store all logs for this run
// directory name format - 2019-November-21_14-33-0
logDirName := strings.Join([]string{"./", prefix, strconv.Itoa(startTime.Year())}, "")
logDirName = strings.Join([]string{logDirName, startTime.Month().String(), strconv.Itoa(startTime.Day())}, "-")
logDirName = strings.Join([]string{logDirName, strconv.Itoa(startTime.Hour())}, "_")