Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

sub-logging

 
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • Quote
  • Report post to moderator
Do I have to build a filter-class for such a common thing?
 
No. No. No. No. Changed my mind. Wanna come down. To see this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!