Navigation Menu

Skip to content

Commit

Permalink
Merge pull request #121 from jonsyu1/master
Browse files Browse the repository at this point in the history
Handle error opening file
  • Loading branch information
goodsign committed Jun 20, 2016
2 parents 57ee49e + c4317d5 commit 752ef64
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions writers_rollingfilewriter.go
Expand Up @@ -307,6 +307,9 @@ func (rw *rollingFileWriter) createFileAndFolderIfNeeded(first bool) error {
stat, err := os.Lstat(filePath)
if err == nil {
rw.currentFile, err = os.OpenFile(filePath, os.O_WRONLY|os.O_APPEND, defaultFilePermissions)
if err != nil {
return err
}

stat, err = os.Lstat(filePath)
if err != nil {
Expand Down

0 comments on commit 752ef64

Please sign in to comment.