• 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
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

log4j.xml configuration

 
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello to everyone.
i am working upon the JBoss server and log4j. can anyone please tell me that
1) how can i force jboss to log at specific directory eg. C:/log
2) what will be given prefrence log4j.xml or log4j.properties.
3) i used both but the problem is log4j.properties creates an empty file at my specific
location. and it is unaccessible (meanz donot created) untill i shutdown the JBoss.
4) how can i get diffrent log for diffrent user in diffrent .log files? some one told me
NDC (Nested Diagnostics Context) but i am unable to find even a single complete example
of NDC.

here is my log4j.xml file



here is my log4j.properties file






please help me out. how can i fix it.
all kinds of suggestions and solutions are highly appreciated from me.

Regards.
 
author
Posts: 3281
8
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What version of Jboss are you using? We use 4.3.0EAP and utilise a jboss-log4j.xml file in the $JBOSS_HOME/<server>/conf directory.
 
Amir Iqbal
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks alot Maritijn. i am using JBOSS 4.0.4 GA. any other suggestion ???
 
Martijn Verburg
author
Posts: 3281
8
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Amir,

Are you supplying your own log4j.xml/properties for each application you deploy? Or are you using the 'central' jboss log4j configuration file?
 
Amir Iqbal
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks alot Martijn.
i have solved the problem by using 'central' jboss log4j configuration file. and redirect it to my specified location.
 
Martijn Verburg
author
Posts: 3281
8
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No problem, glad you solved it!
 
Those are the largest trousers in the world! Especially when next to this 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!