log4j on WebSphere Application Server

2011-04-01 Thread nulll

Hi,

I configured my logging with log4j.properties file using a FileAppender.
When I do my local development, I use Tomcat under Windows.
When deploying on managed-environments (sys, acc, prod), I use WebSphere
under Linux.

Since my various environment use dedicated file structure, I'd like to know
how I can set a log file location which is dynamic.
I would actually want to have my log4j logging written into a file in the
same folder as SystemOut.log.
I defined a LOG_ROOT WebSphere variable but I don't think it's accessible to
LOG4J.

I made some research on the Internet but still didn't find any way to do
that.

Any help is appreciated.

Thanks!
-- 
View this message in context: 
http://old.nabble.com/log4j-on-WebSphere-Application-Server-tp31298324p31298324.html
Sent from the Log4j - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



Re: log4j on WebSphere Application Server

2011-04-01 Thread Jacob Kjome
You can reference Java system properties using the syntaxt ${somePropertyName},
e.g.,

log4j.appender.A1.File=${log.dir}/stdout.log

You can set Java system properties on the command line using...

java -Dlog.dir=/path/to/log/directory 



Jake


On 4/1/2011 1:10 PM, nulll wrote:
 
 Hi,
 
 I configured my logging with log4j.properties file using a FileAppender.
 When I do my local development, I use Tomcat under Windows.
 When deploying on managed-environments (sys, acc, prod), I use WebSphere
 under Linux.
 
 Since my various environment use dedicated file structure, I'd like to know
 how I can set a log file location which is dynamic.
 I would actually want to have my log4j logging written into a file in the
 same folder as SystemOut.log.
 I defined a LOG_ROOT WebSphere variable but I don't think it's accessible to
 LOG4J.
 
 I made some research on the Internet but still didn't find any way to do
 that.
 
 Any help is appreciated.
 
 Thanks!

-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org