File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ const (
70
70
71
71
const (
72
72
LogConsoleOnly = 1 << (8 + iota )
73
+ LogNotToFile
73
74
)
74
75
75
76
func (l LogLevel ) String () string {
@@ -99,7 +100,7 @@ func logWrite(level LogLevel, buf []byte) {
99
100
os .Stdout .Write (buf )
100
101
}
101
102
}
102
- if level & LogConsoleOnly == 0 {
103
+ if level & LogConsoleOnly == 0 && level & LogNotToFile == 0 {
103
104
if fd := logfile .Load (); fd != nil {
104
105
fd .Write (buf )
105
106
}
@@ -377,7 +378,7 @@ func LogAccess(level LogLevel, data any) {
377
378
} else {
378
379
s = (string )(bts .Bytes ()[:bts .Len ()- 1 ]) // we don't want the newline character
379
380
}
380
- logX (level | LogConsoleOnly , s )
381
+ logX (level | LogNotToFile , s )
381
382
fd := accessLogFile .Load ()
382
383
fd .Write (bts .Bytes ())
383
384
}
You can’t perform that action at this time.
0 commit comments