[slf4j-user] Configuration properties within logger context

ceki ceki at qos.ch
Thu Feb 9 15:33:29 CET 2012


Hi Daniel,

I don't follow you. Could you provide an *example* of what you have in 
mind (assume you have complete liberty with the SLF4J API) ?

-- 
Ceki
http://twitter.com/#!/ceki

On 09.02.2012 14:45, Daniel Felix Ferber wrote:
> 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