From 1db1c307d378238959871cc7940d9e802bcab5f0 Mon Sep 17 00:00:00 2001 From: nxshock Date: Tue, 29 Mar 2022 21:27:10 +0500 Subject: [PATCH] Change logs extension to .log --- job.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/job.go b/job.go index 6e973a1..b312a15 100644 --- a/job.go +++ b/job.go @@ -81,7 +81,6 @@ func (j *Job) Run() { j.LastStartTime = startTime.Format(config.TimeFormat) globalMutex.Unlock() - jobLogFile, _ := os.OpenFile(filepath.Join(config.LogFilesPath, j.Name+".txt"), os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0644) defer jobLogFile.Close() defer jobLogFile.WriteString("\n") @@ -97,6 +96,7 @@ func (j *Job) Run() { cmd := exec.Command(command, params...) cmd.Stdout = jobLogFile cmd.Stderr = jobLogFile + jobLogFile, _ := os.OpenFile(filepath.Join(config.LogFilesPath, j.Name+".log"), os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0644) err := cmd.Run() if err != nil {