Skip to content

TurboFilters should be called with format/params/throwable when using fluent logging API #871

@christophejan

Description

@christophejan

I think TurboFilter decide method should be called with provided format/params/throwable the same way whether fluent logging API has been used or not.

Currently, with slf4j-api 2.0.16 and logback-classic 1.5.8 :

  • logger.info(“Hello world.”); call TurboFilter decide method with provided format/params/throwable
  • logger.atInfo().log(“Hello world.”); never call TurboFilter decide with provided format/params/throwable (A call equivalent to logger.isInfoEnabled() with null format/params/throwable is done ; that’s not a problem but that’s not what is expected).

In logback documentation, I found :

  • On Fluent Logging API : The statement logger.atInfo().log(“Hello world.”); is equivalent to : logger.info(“Hello world.”);
  • […] (TurboFilter) are called not only when a given appender is used, but each and every time a logging request is issued. Their scope is wider than appender-attached filters.

I think it’s an issue that TurboFilters is not called with format/params/throwable when using fluent logging API.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions