mirror of https://github.com/sirupsen/logrus.git
Merge pull request #962 from Clivern/patch-1
Update Example to Append to the log file not to overwrite
This commit is contained in:
commit
2a22dbedba
|
@ -187,7 +187,7 @@ func main() {
|
|||
log.Out = os.Stdout
|
||||
|
||||
// You could set this to any `io.Writer` such as a file
|
||||
// file, err := os.OpenFile("logrus.log", os.O_CREATE|os.O_WRONLY, 0666)
|
||||
// file, err := os.OpenFile("logrus.log", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666)
|
||||
// if err == nil {
|
||||
// log.Out = file
|
||||
// } else {
|
||||
|
|
Loading…
Reference in New Issue