Append .log extension to logfiles
This commit is contained in:
parent
a4ce3f8999
commit
df1aca605d
@ -70,7 +70,7 @@ func Logger(logdir string, events <-chan LogEvent) {
|
|||||||
var fd *os.File
|
var fd *os.File
|
||||||
var err error
|
var err error
|
||||||
for event := range events {
|
for event := range events {
|
||||||
logfile = path.Join(logdir, event.where)
|
logfile = path.Join(logdir, event.where + ".log")
|
||||||
fd, err = os.OpenFile(logfile, mode, perm)
|
fd, err = os.OpenFile(logfile, mode, perm)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println("Can not open logfile", logfile, err)
|
log.Println("Can not open logfile", logfile, err)
|
||||||
|
Loading…
Reference in New Issue
Block a user