• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Log rotation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Log rotation


  • Subject: Log rotation
  • From: Benjamin Chew <email@hidden>
  • Date: Wed, 09 Jul 2014 18:18:37 -0700

Hi everyone,

I'm wondering if you could help me out here. I'm trying to implement log rotation, and have been referencing Kieran's example on the wiki (http://wiki.wocommunity.org/display/documentation/Log+Rotation) as a starting point.

I've implemented it very similarly:

# Log4j Configuration

log4j.loggerFactory=er.extensions.logging.ERXLogger$Factory

log4j.rootCategory=INFO, A1, A2


log4j.appender.A1=org.apache.log4j.ConsoleAppender

log4j.appender.A1.layout=er.extensions.logging.ERXPatternLayout

log4j.appender.A1.layout.ConversionPattern=%d{MMM dd HH:mm:ss} %$[%#] %-5p %c %x - %m%n


log4j.appender.A2=org.apache.log4j.DailyRollingFileAppender

log4j.appender.A2.file=${WOOutputPath}

log4j.appender.A2.datePattern='.'yyyyMMddHHmm

log4j.appender.A2.append=true

log4j.appender.A2.layout=er.extensions.logging.ERXPatternLayout

log4j.appender.A2.layout.ConversionPattern=%d{MMM dd HH:mm:ss} %$[%#] %-5p %c %x - %m%n

The only difference is that I'm using the WOOutputPath as the file path (highlighted above). This works great except that the default logging system for my app seems to be clashing with my the DailyRollingFileAppender, such that when I start the app up, I get 2 log files. It looks like the log file generated by the DailyRollingFileAppender gets initialized first, then some code in WOApplication sees it and appends a timestamp to it, then continues to log to the WOOutputPath.

Does anyone have any ideas as to how to deal with this? Like switch off the default logging?

Any help would be greatly appreciated.

Thanks,
Ben
 _______________________________________________
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

  • Prev by Date: Re: Application directory path not found.
  • Next by Date: The Good Path to D2W localization
  • Previous by thread: Re: Application directory path not found.
  • Next by thread: The Good Path to D2W localization
  • Index(es):
    • Date
    • Thread