log4j multiple levels in multiple appenders
I have two appenders: console, and file I have three packages uk.co.bar, uk.co.bar.foo, uk.co.pip
I need all messages (debug and high开发者_StackOverflow社区er) from uk.co.* to be fed into the file.
I want info messages from uk.co.bar.foo to fed to the console I want all messages from uk.co.bar.pip to fed to the console
If I use a logger it restricts messages for both appenders. :-( If I use filters in the console appender I loose control of the package-level i want.
Anyone have a solution?
see this answer. As far as I understand this addresses your problem
Creating multiple log files of different content with log4j
精彩评论