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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

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
}
}