• 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

2 Root categories in 2 config files

 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have 2 application that run on the same JVM.

I unfortunately cannot define, what 2 different applications mean , since they are abstracted by a certain platform.

But the question is probably generic enough.

Each one has a log4j.xml with a root catgeory defined

log4j1
-----
<root>
<appender-ref ref="FILE1"/>
</root>

log4j2
------
<root>
<appender-ref ref="FILE2"/>
</root>

Now will one root , overwrite the other.

I notice the behaviour where one gets overridden by the other.

Since I want to log most of app1 logs to FILE1 and most of app2 logs to FILE2, the above would have been convenient if they worked as separate units.

Regards

Mahesh
 
reply
    Bookmark Topic Watch Topic
  • New Topic