Log4j logging all events which are not caught by the defined loggers -


i have little problem.

i using log4j 1.2.17, , want log logs come packages don't have logger specified. example: in application have multiple frameworks use: primefaces, solr, atmosphere, etc. had configured log4j.xml logging app logs. works great, put "org.primefaces" package logger restricting info logs. now, in console, doesn't exists appender, because don't want have app output without being logged, appear logs atmosphere. not big problem because can put logger this, don't want this. why? because in future appear frameworks have add logger. log4j config file monstrous.

how can create logger logging entire output not caught defined loggers?

if problem not explained please let me know , add required information.

thank much.

you can define root logging entire output not caught defined loggers.

<root>     <appender-ref ref="rootappender " /> </root> 

and if want not propagate logging event root add additivity flag false in loggers.

<logger name="org.primefaces" additivity="false">     <appender-ref ref="orgprimefacesappender" /> </logger> 

Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -