From 75d7a91843b0a7113c10d55359fcb7aaaa801e36 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 15 May 2020 22:44:09 +0200 Subject: [PATCH] Remove intermediate fstree folder from log dirs The logs dir will need to be supplied in a special way anyway --- pmctl/logs.go | 6 +++--- pmctl/run.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pmctl/logs.go b/pmctl/logs.go index 7ee1576d..03d05678 100644 --- a/pmctl/logs.go +++ b/pmctl/logs.go @@ -74,7 +74,7 @@ func finalizeLogFile(logFile *os.File, logFilePath string) { func initControlLogFile() *os.File { // check logging dir - logFileBasePath := filepath.Join(logsRoot.Path, "fstree", "control") + logFileBasePath := filepath.Join(logsRoot.Path, "control") err := logsRoot.EnsureAbsPath(logFileBasePath) if err != nil { log.Printf("failed to check/create log file folder %s: %s\n", logFileBasePath, err) @@ -93,7 +93,7 @@ func logControlError(cErr error) { } // check logging dir - logFileBasePath := filepath.Join(logsRoot.Path, "fstree", "control") + logFileBasePath := filepath.Join(logsRoot.Path, "control") err := logsRoot.EnsureAbsPath(logFileBasePath) if err != nil { log.Printf("failed to check/create log file folder %s: %s\n", logFileBasePath, err) @@ -114,7 +114,7 @@ func logControlError(cErr error) { //nolint:deadcode,unused // TODO func logControlStack() { // check logging dir - logFileBasePath := filepath.Join(logsRoot.Path, "fstree", "control") + logFileBasePath := filepath.Join(logsRoot.Path, "control") err := logsRoot.EnsureAbsPath(logFileBasePath) if err != nil { log.Printf("failed to check/create log file folder %s: %s\n", logFileBasePath, err) diff --git a/pmctl/run.go b/pmctl/run.go index 53133697..432bfa3d 100644 --- a/pmctl/run.go +++ b/pmctl/run.go @@ -227,7 +227,7 @@ func execute(opts *Options, args []string) (cont bool, err error) { // log files var logFile, errorFile *os.File - logFileBasePath := filepath.Join(logsRoot.Path, "fstree", opts.ShortIdentifier) + logFileBasePath := filepath.Join(logsRoot.Path, opts.ShortIdentifier) err = logsRoot.EnsureAbsPath(logFileBasePath) if err != nil { log.Printf("failed to check/create log file dir %s: %s\n", logFileBasePath, err)