Re: log rotation?
Re: log rotation?
- Subject: Re: log rotation?
- From: "Yung-Luen Lan" <email@hidden>
- Date: Mon, 21 Jul 2008 17:54:40 +0800
I've write it to WO wiki:
http://wiki.objectstyle.org/confluence/display/WO/Web+Applications-Deployment-Logging
Anyway, how do you enable the property substitution in wonder?
I use WO 5.4.2 plus the latest Wonder but the @@blahblah@@ things were
not substituted.
Is there any configuration have to be made?
Regards,
yllan
On Fri, Jul 18, 2008 at 4:29 AM, Kieran Kelleher <email@hidden> wrote:
> An example is best ... here is my logging config straight from my current
> app down below......
>
> Note the use of @@blahblah@@ property substitution ... a Wonder feature that
> resolves when it reads Properties files.
>
> Note the values for log4j.appender.A2.file and log4j.appender.myMail.Subject
>
> Logs for every instance are unique and auto-rotate every day. Any errors get
> instantly emailed with subject line indicating which woa, host and port.
>
> <snip>
> #########################################################################
> # ERXLogger
> #########################################################################
> # Pattern codes:
> # %-5p : Priority DEBUG, INFO, WARN, etc.
> # %d(ISO08601 : Date and time
> # %t : Thread
> # %c : Logger name (usually a class name)
> # %m%n : Log message arguments
>
> # Available levels are DEBUG, INFO, WARN, ERROR, FATAL
>
> # log4j appender and formatting
> log4j.rootLogger=WARN, A2, myMail
> log4j.loggerFactory=er.extensions.ERXLogger$Factory
>
> # A1 is a ConsoleAppender
> log4j.appender.A1=org.apache.log4j.ConsoleAppender
> log4j.appender.A1.layout=er.extensions.ERXPatternLayout
> #log4j.appender.A1.layout.ConversionPattern=%-5p %d{HH:mm:ss} (%-20c:%L) %x
> -%m%n
> log4j.appender.A1.layout.ConversionPattern=%r %-5p [%t] (%C{3}, %M, %L) -
> %n%m%n%n
>
> # A2 is a DailyRollingFileAppender
> log4j.appender.A2=org.apache.log4j.DailyRollingFileAppender
> log4j.appender.A2.file=/var/log/webobjects_apps/@@build.app.bundle.name@@-@@WOPort@@.log
> log4j.appender.A2.datePattern='.'yyyy-MM-dd
> log4j.appender.A2.append=true
> log4j.appender.A2.layout=er.extensions.ERXPatternLayout
> log4j.appender.A2.layout.ConversionPattern=%-5p %d{ISO8601} [%t] (%c: %L) -
> %m%n
>
> # myMail is the SMTPAppender
> log4j.appender.myMail=org.apache.log4j.net.SMTPAppender
> log4j.appender.myMail.Threshold=ERROR
> log4j.appender.myMail.BufferSize=10
> # log4j.appender.myMail.To=<email1>,<email2>
> log4j.appender.myMail.From=<removed>
> log4j.appender.myMail.SMTPHost=@@cheetah.smtpserver@@
> log4j.appender.myMail.Subject=Log4J Error (@@build.app.bundle.name@@ host
> @@host@@ port @@WOPort@@)
> log4j.appender.myMail.layout=er.extensions.ERXPatternLayout
> # log4j.appender.myMail.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
> log4j.appender.myMail.layout.ConversionPattern=%r %-5p %d{ISO8601}%n%n%V{t
> total/u used/f free}%n%n[%t] %n%n (%C, %M, %F:%L) - %n%n%m%n
>
> </snip>
>
>
>
>
>
> On Jul 17, 2008, at 1:43 PM, Chuck Hill wrote:
>
>>
>> On Jul 17, 2008, at 10:07 AM, Guido Neitzer wrote:
>>
>>> On 17.07.2008, at 11:04, Yung-Luen Lan wrote:
>>>
>>>> How to set the log to old way? (Automatically change the name everyday)
>>>
>>> Take a look at Log4j.
>>
>>
>> So how do you work this? Does that not just put the logs from all the
>> instances into one file? I am still just routing the log4j stuff to console
>> so that the log file set in JavaMonitor gets the output.
>>
>> Chuck
>>
>> --
>>
>> Practical WebObjects - for developers who want to increase their overall
>> knowledge of WebObjects or who are trying to solve specific problems.
>> http://www.global-village.net/products/practical_webobjects
>>
>>
>>
>>
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>>
>> This email sent to email@hidden
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden