mirror of
https://github.com/coder/coder.git
synced 2026-06-03 04:58:23 +00:00
fix(cli/server): apply log filter to log message as well as name (#9232)
This commit is contained in:
+1
-1
@@ -1845,7 +1845,7 @@ func (f *debugFilterSink) compile(res []string) error {
|
||||
func (f *debugFilterSink) LogEntry(ctx context.Context, ent slog.SinkEntry) {
|
||||
if ent.Level == slog.LevelDebug {
|
||||
logName := strings.Join(ent.LoggerNames, ".")
|
||||
if f.re != nil && !f.re.MatchString(logName) {
|
||||
if f.re != nil && !f.re.MatchString(logName) && !f.re.MatchString(ent.Message) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user