Skip to content

Commit

Permalink
Append to debug log files, don't clobber.
Browse files Browse the repository at this point in the history
  • Loading branch information
sean- committed Oct 18, 2016
1 parent 6d1e7ab commit b1c3649
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion helper/logging/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"log"
"os"
"strings"
"syscall"

"github.com/hashicorp/logutils"
)
Expand All @@ -31,7 +32,7 @@ func LogOutput() (logOutput io.Writer, err error) {
logOutput = os.Stderr
if logPath := os.Getenv(EnvLogFile); logPath != "" {
var err error
logOutput, err = os.Create(logPath)
logOutput, err = os.OpenFile(logPath, syscall.O_CREAT|syscall.O_RDWR|syscall.O_APPEND, 0666)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit b1c3649

Please sign in to comment.