Relative Content

Tag Archive for logback

How to avoid logs duplication in a logger having several appenders?

I want to distribute logs to several files depending a flag in the LoggingEvent. Lets say all log lines with the flag valued to “A”, must go to A.log, thos with value “B”, must go to B.log, etc. There is a ‘default’ file default.log in which logs with values other than “A” or “B” should go.