Remove intermediate fstree folder from log dirs

The logs dir will need to be supplied in a special way anyway
This commit is contained in:
Daniel 2020-05-15 22:44:09 +02:00
parent 652518e527
commit 75d7a91843
2 changed files with 4 additions and 4 deletions

View file

@ -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)

View file

@ -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)