• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

sub-logging

 
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a fileAppender:




I log these two categories into my log-file:

First Category:



and additionally, I want to log the 'org.hibernate.SQL' into the file appender:

Second Category:




All works but I want to adjust my Appender 'MyLog' -
it should only logs the 'org.hibernate.SQL' which was produced by the class 'myClass.MyBean' and not by other classes (which also makes use of org.hibernate.SQL).

How can I achieve that?
 
nimo frey
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is the problem because of Appender Additivity ??

using additivity="false" does not work:



I only want to log exactly these 'org.hibernate.SQL'-logs which were triggered by the class 'myClass.MyBean'.
Actually, I have other classes which also makes use of hibernate and these logs are also involved in 'MyLog' - this, I want to avoid!
How can I do that?
 
nimo frey
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do I have to build a filter-class for such a common thing?
 
reply
    Bookmark Topic Watch Topic
  • New Topic