*
The moose likes JBoss/WildFly and the fly likes How to get log4j directory path 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 "How to get log4j directory path" Watch "How to get log4j directory path" New topic
Author

How to get log4j directory path

Rohit Alwar
Greenhorn

Joined: Oct 03, 2010
Posts: 3
Hi,

How we can get the absolute path of log directory in Java program. I am using jboss server and the configuration is as follow


For log4j.xml
<param name="File" value="${mydir.logdir}/mylog.xml" />

Jboss run.bat entry

run -c local -Dmydir.logdir=c:\logs
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9912
    
158

run -c local -Dmydir.logdir=c:\logs

Since you are passing the absolute path as a system property, you should be able to get it as follows:



[My Blog] [JavaRanch Journal]
Rohit Alwar
Greenhorn

Joined: Oct 03, 2010
Posts: 3
Thanks It's working
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get log4j directory path
 
Similar Threads
Error While Starting JBoss 5.1.0 GA!!!
Jboss not starting aka shutting down
linux beginner to conifg the jboss
Hot deployment problem
Not sure of this line [path-to-jboss]