Win a copy of Svelte and Sapper in Action this week in the JavaScript 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Jboss can not recognize custom log4j.properties file

 
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I want my Jboss 4.2 to use a custom log4j.properties file.
For that I have changed the jboss-service.xml file as below:



But at the time of deploying Jboss can not find the file specified(FileNotFoundException).
How can I configure it so that it can find the log4j.properties file anywhere(outside jboss) else?
I am observing only .xml file is being recognized by jboss in above code. If that is the case then how could I make log4j.properties file being recognized by Jboss without keeping it in .ear.

Also I have placed the below code in log4j.properties to generate log file . Is that ok?
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


That doesn't look right. Try:

 
Kousik Majumder
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Now my Jboss configuring after putting the line.


But is does nothing after that. Jboss just stops after configuring log4j.


 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does your log4j.properties look like? Maybe you have set logging levels to a very high level.
 
Kousik Majumder
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my log4j.properties
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

log4j.rootLogger=ERROR, console, logfile



Your root logger level is set to ERROR, which means that anything below ERROR level will not be logged, unless you specifically configure individual loggers (like you have done for org.hibernate)

Usually, the root logger is set to INFO levels.
 
Kousik Majumder
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Thank you Jaikiran. It is working fine now.
 
Oh. Hi guys! Look at this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic