[slf4j-user] Configuration properties within logger context

Daniel Felix Ferber dffforum at gmail.com
Thu Feb 9 14:45:23 CET 2012


Hi all,

I was wondering about slf4j being able to get properties defined within the
configuration file form the logger framework (eg logback or log4j). Would that
be a reasonable use for slf4j? 

1) I would configure the granularity (amount of content) of a log message that
reports the result of a long-running execution.

2) Also, I would configure the number of step between two log messages on a
long-running task. 

For the first case, I could define several loggers (a simple one, a detailed
one). I don't think I should use two levels, since the report cannot be
considered 'info', not 'debug' or 'trace'.

For the second case, I am not sure how to handle it. Currently the application
has a configuration property that defines how log will behave (number of steps,
amount of details). But taking it rigorously, these are not application
configuration, but logger configuration.

Best regards,
Daniel Felix Ferber



More information about the slf4j-user mailing list