Skip to content

Commit 33ffc07

Browse files
gearnoders
authored andcommitted
Fix logger is override when debug is set to true (#83)
1 parent 4763a1f commit 33ffc07

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cors.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ func New(options Options) *Cors {
111111
maxAge: options.MaxAge,
112112
optionPassthrough: options.OptionsPassthrough,
113113
}
114-
if options.Debug {
114+
if options.Debug && c.Log == nil {
115115
c.Log = log.New(os.Stdout, "[cors] ", log.LstdFlags)
116116
}
117117

0 commit comments

Comments
 (0)