Heri, Firstly, Many thanks - I thought it was more to do with my coding which was reason i posted in this forum, sorry. Obviously my stupidity of not understanding properly until now the way levels work.
Secondly, The filter worked a treat! Many Thanks, Steve Bender Heri wrote: > > First: Do not ask usage questions on the developer list. Usage questions > should be asked on the User list. > > Second: Your sample config file indeed directs all log events ERROR+ to > all appenders, since the threshold parameter only denotes the lowest level > to be logged, not the highest. If you want the JDBC levels only be logged > to the DATABASE appender, then you should use a LevelRangeFilter (with an > upper limit of FATAL) on the other appenders (DEBUGFILE, EXCEPTIONFILE). > > Heri > > -----Ursprüngliche Nachricht----- > Von: SteveWay2010 [mailto:steve....@infotech-enterprises.com] > Gesendet: Freitag, 19. Februar 2010 14:03 > An: log4j-dev@logging.apache.org > Betreff: Custom Level Logging to All Appenders > > > Hi Everyone, > > I have created a Logging Level which is higher than FATAL as I will always > want it to be logged amongst a number of other things. > > So my level is JDBC which is specified as a static final int JDBC = > Level.FATAL +1; > > My Code calls a custom logger (Called "OSOD") and the logging is > controlled through this. The problem is, That no matter how my log4.xml > file is configured, It logs to EVERY appender. > > Attached is my log4j.xml config. > http://old.nabble.com/file/p27652587/log4j.xml log4j.xml > > > Any help would be greatly appreciated. > > Many Thanks, > > Steve > > > -- > View this message in context: > http://old.nabble.com/Custom-Level-Logging-to-All-Appenders-tp27652587p27652587.html > Sent from the Log4j - Dev mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org > For additional commands, e-mail: log4j-dev-h...@logging.apache.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org > For additional commands, e-mail: log4j-dev-h...@logging.apache.org > > > -- View this message in context: http://old.nabble.com/Custom-Level-Logging-to-All-Appenders-tp27652587p27686031.html Sent from the Log4j - Dev mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org