[prev in list] [next in list] [prev in thread] [next in thread] 

List:       log4j-dev
Subject:    RE: DailyRollingFileAppender for a Struts Web Application using WAS
From:       Paula McDowell <pmcdowell12 () hotmail ! com>
Date:       2008-01-23 18:00:37
Message-ID: BLU128-W26182F95818B289233E8CBAB3F0 () phx ! gbl
[Download RAW message or body]

Thanks.  I'll give it a try.

> From: hoju@visi.com
> Subject: Re: FW: DailyRollingFileAppender for a Struts Web Application using WAS 6.0 and Struts 1.1
> To: log4j-dev@logging.apache.org
> Date: Wed, 23 Jan 2008 11:10:32 -0600
> 
> 
> java ... -Dlog.dir=/my/preferred/path WAS
> 
> In log4j.properties....
> 
> log4j.appender.MyAppender.File=${log.dir}/mylogfile.log
> 
> 
> Now you can use the same log file for all environments.  Just make sure you 
> set the system property at startup.
> 
> Jake
> 
> On Wed, 23 Jan 2008 09:44:03 -0600
>   Paula McDowell <pmcdowell12@hotmail.com> wrote:
> > 
> > Hi, all. Is there a way to set a DailyRollingFileAppender outside of a 
> >log4j.properties in a struts application? My company’s website is running in 
> >a mainfame environment with multiple WAS instances for each region ie., 
> >development, test, and production. This type of architecture requires my log 
> >file to be environment specific i.e. /temp/dev/log or /temp/prod/log. I could 
> >have a log4j.properties for each environment, but don’t really feel good 
> >about that approach.
> > 
> > I’ve created a StartUp plugin that will create a log file using a variable 
> >defined as a WAS Resource Environment Entry. The plugin reads the variable 
> >and thus creates and names the log file appropriately. I have yet to figure 
> >out how to instantiate a DailyRollingFileAppender that will roll this file 
> >and create a new log at the beginning of each day.
> > 
> > Thanks,
> > 
> > Paula
> > 
> > _________________________________________________________________
> > Shed those extra pounds with MSN and The Biggest Loser!
> > http://biggestloser.msn.com/
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> >For additional commands, e-mail: log4j-dev-help@logging.apache.org
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org
> 

_________________________________________________________________
Shed those extra pounds with MSN and The Biggest Loser!
http://biggestloser.msn.com/
[Attachment #3 (text/html)]

<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
Thanks.&nbsp; I'll give it a try.<br><br>&gt; From: hoju@visi.com<br>&gt; Subject: \
Re: FW: DailyRollingFileAppender for a Struts Web Application using WAS 6.0 and \
Struts 1.1<br>&gt; To: log4j-dev@logging.apache.org<br>&gt; Date: Wed, 23 Jan 2008 \
11:10:32 -0600<br>&gt; <br>&gt; <br>&gt; java ... -Dlog.dir=/my/preferred/path \
WAS<br>&gt; <br>&gt; In log4j.properties....<br>&gt; <br>&gt; \
log4j.appender.MyAppender.File=${log.dir}/mylogfile.log<br>&gt; <br>&gt; <br>&gt; Now \
you can use the same log file for all environments.  Just make sure you <br>&gt; set \
the system property at startup.<br>&gt; <br>&gt; Jake<br>&gt; <br>&gt; On Wed, 23 Jan \
2008 09:44:03 -0600<br>&gt;   Paula McDowell &lt;pmcdowell12@hotmail.com&gt; \
wrote:<br>&gt; &gt; <br>&gt; &gt; Hi, all. Is there a way to set a \
DailyRollingFileAppender outside of a <br>&gt; &gt;log4j.properties in a struts \
application? My company’s website is running in <br>&gt; &gt;a mainfame environment \
with multiple WAS instances for each region ie., <br>&gt; &gt;development, test, and \
production. This type of architecture requires my log <br>&gt; &gt;file to be \
environment specific i.e. /temp/dev/log or /temp/prod/log. I could <br>&gt; &gt;have \
a log4j.properties for each environment, but don’t really feel good <br>&gt; \
&gt;about that approach.<br>&gt; &gt; <br>&gt; &gt; I’ve created a StartUp plugin \
that will create a log file using a variable <br>&gt; &gt;defined as a WAS Resource \
Environment Entry. The plugin reads the variable <br>&gt; &gt;and thus creates and \
names the log file appropriately. I have yet to figure <br>&gt; &gt;out how to \
instantiate a DailyRollingFileAppender that will roll this file <br>&gt; &gt;and \
create a new log at the beginning of each day.<br>&gt; &gt; <br>&gt; &gt; \
Thanks,<br>&gt; &gt; <br>&gt; &gt; Paula<br>&gt; &gt; <br>&gt; &gt; \
_________________________________________________________________<br>&gt; &gt; Shed \
those extra pounds with MSN and The Biggest Loser!<br>&gt; &gt; \
http://biggestloser.msn.com/<br>&gt; &gt; \
---------------------------------------------------------------------<br>&gt; &gt; To \
unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org<br>&gt; &gt;For \
additional commands, e-mail: log4j-dev-help@logging.apache.org<br>&gt; &gt; <br>&gt; \
&gt; <br>&gt; <br>&gt; <br>&gt; \
---------------------------------------------------------------------<br>&gt; To \
unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org<br>&gt; For additional \
commands, e-mail: log4j-dev-help@logging.apache.org<br>&gt; <br><br /><hr />Shed \
those extra pounds with MSN and The Biggest Loser! <a \
href='http://biggestloser.msn.com/' target='_new'>Learn more.</a></body> </html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic