• 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

[log4j] How to split logs?

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I'm trying configure log4j to have logs of my app in one file and logs of frameworks (spring, struts2, hibernate) in other. It's part of my log4j.xml file:



But I have for example the following lines:
[2010-04-11 13:38:15.750]INFO [main][org.apache.struts2.config.BeanSelectionProvider] Choosing bean (struts) for interface com.opensymphony.xwork2.util.reflection.ReflectionProvider
[2010-04-11 13:38:15.015]DEBUG[main][org.hibernate.impl.SessionFactoryObjectFactory] initializing class SessionFactoryObjectFactory
[2010-04-11 13:38:15.109]DEBUG[main][org.springframework.beans.factory.support.DefaultListableBeanFactory] Finished creating instance of bean 'subtitlesParser'

in both log files, I'd like to have it only in file configured by APP_LOG2. What am I doing wrong?

 
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So APP_LOG is your console log?
 
Marcin noway
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Martijn Verburg wrote:So APP_LOG is your console log?



No - both are files.
 
Martijn Verburg
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you need to look at your ROOT settings...
 
reply
    Bookmark Topic Watch Topic
  • New Topic