FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor


 
 
LinkBack Thread Tools
 
Old 07-08-2010, 10:25 AM
Kaushal Shriyan
 
Default log4j

Hi,

Is there a way to run log4j appender at a specified time?

log4j.rootLogger=INFO, R
log4j.appender.R=org.apache.log4j.DailyRollingFile Appender
log4j.appender.R.File=${catalina.home}/logs/catalina.out
log4j.appender.R.DatePattern='.'yyyy-MM-dd
log4j.appender.R.layout=org.apache.log4j.PatternLa yout

I have put the log4j.properties under /opt/tomcat0/common/classes

Please suggest.

Thanks and Regards

Kaushal

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-08-2010, 10:26 AM
Kaushal Shriyan
 
Default log4j

Hi,

Is there a way to run log4j appender at a specified time?

log4j.rootLogger=INFO, R
log4j.appender.R=org.apache.log4j.DailyRollingFile Appender
log4j.appender.R.File=${catalina.home}/logs/catalina.out
log4j.appender.R.DatePattern='.'yyyy-MM-dd
log4j.appender.R.layout=org.apache.log4j.PatternLa yout

I have put the log4j.properties under /opt/tomcat0/common/classes

Please suggest.

Thanks and Regards

Kaushal

--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam
 
Old 07-08-2010, 11:04 AM
Hakan Koseoglu
 
Default log4j

Kaushal,
On 08/07/10 11:26, Kaushal Shriyan wrote:
> Is there a way to run log4j appender at a specified time?
I am not sure what you mean.
Do you want to specify when the file rolls over?
The data pattern can take 'yyyy-MM-dd-HH' or 'yyyy-MM-dd-HH-mm' format
to roll over hourly or minutely.
See the log4j's apidoc for more details.

--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam
 
Old 07-08-2010, 11:20 AM
Kaushal Shriyan
 
Default log4j

On Thu, Jul 8, 2010 at 4:34 PM, Hakan Koseoglu <hakan@koseoglu.org> wrote:
> Kaushal,
> On 08/07/10 11:26, Kaushal Shriyan wrote:
>> Is there a way to run log4j appender at a specified time?
> I am not sure what you mean.
> Do you want to specify when the file rolls over?
> The data pattern can take 'yyyy-MM-dd-HH' or 'yyyy-MM-dd-HH-mm' format
> to roll over hourly or minutely.
> See the log4j's apidoc for more details.

Hakan,

Basically if i set log4j.appender.R.DatePattern='.'yyyy-MM-dd in
log4j.properties It rolls over at midnight. is there a way to roll
over at say 12:00 Noon

Please suggest/guide

Thanks,

Kaushal

--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam
 
Old 07-08-2010, 12:14 PM
Hakan Koseoglu
 
Default log4j

Hi Kaushal,

On 08/07/10 12:20, Kaushal Shriyan wrote:
> Basically if i set log4j.appender.R.DatePattern='.'yyyy-MM-dd in
> log4j.properties It rolls over at midnight. is there a way to roll
> over at say 12:00 Noon

If you check the available options you can see that
DailyRollingFileAppender has limited options on that. One of the options
is rolling over at midnight and midday, see this link for built-in
available options:
http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/DailyRollingFileAppender.html

You can easily subclass this and write your own appender with additional
rules or google if someone else already done it.


--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam
 
Old 07-08-2010, 12:53 PM
"Amedee Van Gasse (ub)"
 
Default log4j

On Thu, July 8, 2010 12:25, Kaushal Shriyan wrote:
> Hi,
>
> Is there a way to run log4j appender at a specified time?
>
> log4j.rootLogger=INFO, R
> log4j.appender.R=org.apache.log4j.DailyRollingFile Appender
> log4j.appender.R.File=${catalina.home}/logs/catalina.out
> log4j.appender.R.DatePattern='.'yyyy-MM-dd
> log4j.appender.R.layout=org.apache.log4j.PatternLa yout
>
> I have put the log4j.properties under /opt/tomcat0/common/classes
>
> Please suggest.
>
> Thanks and Regards
>
> Kaushal

Hello Kaushal,

This is a mailing list for Ubuntu users.
There are a few Java developers here (myself included) but they are a
minority.
I think that you'd better ask your question on the log4j mailing list:
log4j-user@logging.apache.org
More info on http://logging.apache.org/log4j/1.2/mail-lists.html


Kind regards,

--
Amedee


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 06:58 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org