update name only when writing

This commit is contained in:
dimagolomozy
2021-08-03 17:07:49 +03:00
parent f11d59ba19
commit 9e2754f673
2 changed files with 0 additions and 3 deletions
-2
View File
@@ -82,7 +82,6 @@ func NewFileOutput(pathTemplate string, config *FileOutputConfig) *FileOutput {
o := new(FileOutput)
o.pathTemplate = pathTemplate
o.config = config
o.updateName()
if strings.Contains(pathTemplate, "%r") {
o.requestPerFile = true
@@ -98,7 +97,6 @@ func NewFileOutput(pathTemplate string, config *FileOutputConfig) *FileOutput {
if o.IsClosed() {
break
}
o.updateName()
o.flush()
}
}()