[logback-user] separate task log files (slf4j + logback)

Ceki Gulcu ceki at qos.ch
Tue Oct 17 16:18:06 CEST 2017


Hi Denis,

I think SiftingAppender is the way to go here. See

   https://logback.qos.ch/manual/appenders.html#SiftingAppender

--
Ceki

On 17.10.2017 15:28, Денис Матвеев wrote:
> Hello!
>
> I began to consider the possibility of logging in a new major Java
> application and so far I could not find (jul, logback) how to do the
> following:
> - Loggers for different subtasks are created inside the program
> (LoggerFactory.getLogger(logName)), I want the logName to be the name of
> the log file, the number of subtasks is unknown in advance,
>
> i.e. so you do not have to edit the configuration file when writing the
> next subtask, which explicitly assigns the log name and correlates it
> with some file.
>
> Is it possible to register this once at the configuration file level so
> that it does not have to be changed in the future?
>
> Thanks for your job.
>
> Best regards
>
> Denis Matveev
>
> Russia
>
> Ekaterinburg


More information about the logback-user mailing list