Adapt modules to new core module and dir structure handling

This commit is contained in:
Daniel
2019-07-31 22:36:09 +02:00
parent 7a6189143c
commit 328fc9087f
15 changed files with 122 additions and 91 deletions

View File

@@ -207,10 +207,10 @@ func execute(opts *Options, args []string) (cont bool, err error) {
// log files
var logFile, errorFile *os.File
logFileBasePath := filepath.Join(databaseRootDir, "logs", "fstree", opts.ShortIdentifier)
err = os.MkdirAll(logFileBasePath, 0777)
logFileBasePath := filepath.Join(logsRoot.Path, "fstree", opts.ShortIdentifier)
err = logsRoot.EnsureAbsPath(logFileBasePath)
if err != nil {
log.Printf("failed to create log file folder %s: %s\n", logFileBasePath, err)
log.Printf("failed to check/create log file dir %s: %s\n", logFileBasePath, err)
} else {
// open log file
logFilePath := filepath.Join(logFileBasePath, fmt.Sprintf("%s.log", time.Now().UTC().Format("2006-02-01-15-04-05")))