Meaningless Drivel is fun!*
The moose likes JBoss/WildFly and the fly likes Log4J Issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Log4J Issue" Watch "Log4J Issue" New topic
Author

Log4J Issue

harbir hundal
Greenhorn

Joined: May 07, 2011
Posts: 14

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

Joined: Jul 26, 2007
Posts: 10167
    
    8

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.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9912
    
158

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.


[My Blog] [JavaRanch Journal]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Log4J Issue
 
Similar Threads
log4j.properties: FileNotFoundException
Unable to generate application log file
log4j file logging problem
Log file not created....
Running JBoss-5.1.0.GA as a service on Red Hat?