Skip to content

Commit

Permalink
fix: unit tests error
Browse files Browse the repository at this point in the history
  • Loading branch information
shipengqi committed Sep 6, 2023
1 parent 686dd0f commit 6bcac3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type Logger struct {
func New(opts *Options) *Logger {
l := &Logger{}
// set a default filename encoder if log file is enabled
if !opts.DisableFile && len(opts.Output) > 0 {
if !opts.DisableFile && len(opts.Output) > 0 && opts.FilenameEncoder == nil {
opts.FilenameEncoder = DefaultFilenameEncoder
}

Expand Down

0 comments on commit 6bcac3a

Please sign in to comment.