As a link, when you try to change the code responsible for creating registrars, there are many rules that must be followed for the registrar to work.
Now I have experience programming the slf4j / logback software configuration.
Task
The program should open a separate log file for each processed input file.
The solution of the problem
Instead of configuring logback via xml, you need to manually create instances of encoders, add-ons and logs, and then configure and link them together.
Caution 1
Registration fails when trying to share an encoder (i.e. PatternLayoutEncoder) between an application.
Reservation Solution 1
Create a separate encoder for each application.
Caveat 2
The reservation refuses to write anything if the encoders and applications are not connected to the logging protocol.
Reservation Solution 2
Call setContext for each encoder and application passing through the LoggerFactory as a parameter.
Caveat 3
Denial of registration does not allow registering anything if encoders and applications do not start.
Reservation Solution 3
Encoders and appletsmust be launched in the correct order, that is, the first encoders and then the applications.
Caveat 4
RollingPolicy objects (i.e. TimeBasedRollingPolicy) generate strange error messages, such as “date format not recognized”, if they are not attached to the same context as the appender.
Reservation Solution 4
calling setContext on a RollingPolicy is the same as calling coders and add-ons.
Here is a working example of a manual log configuration: