fix(cli/server): apply log filter to log message as well as name (#9232)

This commit is contained in:
Ammar Bandukwala
2023-08-21 17:53:26 -05:00
committed by GitHub
parent 2a263b9534
commit 69ec8d774b
+1 -1
View File
@@ -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
}
}