You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by James Stauffer <st...@gmail.com> on 2006/06/19 16:48:42 UTC

Re: Specifying my appender in property file

The full name of the class that you created.

On 7/20/06, Kailash KN <ka...@thbs.com> wrote:
> Hi,
> I have written my own Appender extending RollingFileAppender, how do i specify log4j to use my appender instead of log4j's RollingFileAppender???
> This change has to be done in the property file.
>
> Here goes an excerpt of my log4j.properties file -
>
> log4j.debug=true
> log4j.logger.debugLogg=DEBUG, RollOver
> log4j.appender.RollOver=?
> log4j.appender.RollOver.layout=org.apache.log4j.PatternLayout
> log4j.appender.RollOver.layout.ConversionPattern=%d{dd-MMM-yyyy  HH\:mm\:ss} %6p - %m %n
>
> ....
> ....
> ....
>
> What do i specify in the place of "?"
>
>
> Any help would be greatly appreciated. Thanks in advance.
>
> Regards,
> Kailash.K.N.
>
>


-- 
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/

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


RE: RollingFileAppender not rolling over

Posted by "Levy, Jeremy" <Je...@morganstanley.com>.
Looks like this is an issue:

http://marc.theaimsgroup.com/?l=log4j-user&m=106321621416549&w=2

Giving that a shot and seeing what happens... 

-----Original Message-----
From: Levy, Jeremy 
Sent: Monday, June 19, 2006 2:08 PM
To: Log4J Users List
Subject: RollingFileAppender not rolling over

Below is an excerpt from my log4j.properties file.

As I understood it, if I used the RollingFileAppender, when the log file
reached the MaxFileSize the log would be renamed with a .1 appended to
the end.  Only MaxBackupIndex # of copies would be kept.  

What I am noticing is that when the MaxFileSize is met, the log purged
and no backups are kept.

J
---------------------------------

log4j.debug=true
log4j.rootCategory=WARN
log4j.logger.com.myprod.prog=DEBUG,MyFile

log4j.appender.MyFile=org.apache.log4j.RollingFileAppender
log4j.appender.MyFile.File=logs/myLogService.log
log4j.appender.MyFile.MaxFileSize=10MB
log4j.appender.MyFile.MaxBackupIndex=100
log4j.appender.MyFile.layout=org.apache.log4j.PatternLayout
log4j.appender.MyFile.layout.ConversionPattern=%d{ISO8601} %-5p [%t]
App:%X{appName} %c{2} - %m%n
 
 
 
--------------------------------------------------------

Important Notice to Recipients:
It is important that you do not use e-mail to request, authorize or
effect the purchase or sale of any security or commodity, to send fund
transfer instructions, or to effect any other transactions. Any such
request, orders, or instructions that you send will not be accepted and
will not be processed by Morgan Stanley.

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

Important Notice to Recipients:
It is important that you do not use e-mail to request, authorize or effect the purchase or sale of any security or commodity, to send fund transfer instructions, or to effect any other transactions. Any such request, orders, or instructions that you send will not be accepted and will not be processed by Morgan Stanley.

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


RollingFileAppender not rolling over

Posted by "Levy, Jeremy" <Je...@morganstanley.com>.
Below is an excerpt from my log4j.properties file.

As I understood it, if I used the RollingFileAppender, when the log file
reached the MaxFileSize the log would be renamed with a .1 appended to
the end.  Only MaxBackupIndex # of copies would be kept.  

What I am noticing is that when the MaxFileSize is met, the log purged
and no backups are kept.

J
---------------------------------

log4j.debug=true
log4j.rootCategory=WARN
log4j.logger.com.myprod.prog=DEBUG,MyFile

log4j.appender.MyFile=org.apache.log4j.RollingFileAppender
log4j.appender.MyFile.File=logs/myLogService.log
log4j.appender.MyFile.MaxFileSize=10MB
log4j.appender.MyFile.MaxBackupIndex=100
log4j.appender.MyFile.layout=org.apache.log4j.PatternLayout
log4j.appender.MyFile.layout.ConversionPattern=%d{ISO8601} %-5p [%t]
App:%X{appName} %c{2} - %m%n
 
 
 
--------------------------------------------------------

Important Notice to Recipients:
It is important that you do not use e-mail to request, authorize or effect the purchase or sale of any security or commodity, to send fund transfer instructions, or to effect any other transactions. Any such request, orders, or instructions that you send will not be accepted and will not be processed by Morgan Stanley.

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