Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Log4J Issue

 
harbir hundal
Greenhorn
Posts: 14
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

I am trying to configure the loggin to my web application.

This is where I want my application to put the logs:


If I do the following in the log4J.properties, the logs are created fine:


I have an environment variable


And when I do like following in the log4J.properties, it not working.


Can someone please help me, I want to use JBOSS_HOME, so that its not hardcoded.

I am using JBOSS as a webserver.

Any help will be greatly appreciated.

Regards
Adofo
 
Maneesh Godbole
Saloon Keeper
Posts: 11092
13
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you read http://docs.jboss.org/process-guide/en/html/logging.html
I will move this topic over to the JBoss forum, where you stand a better chance of getting your question answered.
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
harbir hundal wrote:
If I do the following in the log4J.properties, the logs are created fine:


I have an environment variable


And when I do like following in the log4J.properties, it not working.




JBoss AS sets certain system properties which you can use here. For pointing to the log folder of the server, you can use:



Also, see this blog for an example.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic