Extra RollingFileAppender with NLOG4j

2010-11-03 Thread Kenneth.Lam
I'm trying to get the RollingFileAppender from the extra log4j companion file 
working but I'm having problems configuring the appender.  I am using this with 
the most current version of NLOG4J

The following is my config file:

?xml version=1.0 encoding=UTF-8 ?
!DOCTYPE log4j:configuration SYSTEM log4j.dtd

log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/;
appender name=console class=org.apache.log4j.ConsoleAppender
param name=Target value=System.out/
layout class=org.apache.log4j.PatternLayout
param name=ConversionPattern value=%-5p %c{1} - %m%n/
/layout
/appender

appender name=logFileAppender 
class=org.apache.log4j.rolling.RollingFileAppender
rollingPolicy class=org.apache.log4j.rolling.TimeBasedRollingPolicy
param name=FileNamePattern 
value=/log/metrics.%d{-MM-dd-HH}.log /
/rollingPolicy
layout class=org.apache.log4j.PatternLayout
param name=ConversionPattern value=%m%n /
/layout
/appender

!-- --
!-- Loggers --
!-- --
logger name=com.barcap.eq.common.metric.LoggingMetric additivity=false
level value=INFO /
appender-ref ref=console /
appender-ref ref=logFileAppender /
/logger

root
priority value =debug /
appender-ref ref=console /
/root

/log4j:configuration


At startup, I get the following errors:
log4j:ERROR Element type rollingPolicy must be declared.
log4j:ERROR The content of element type appender must match 
(errorHandler?,param*,layout?,filter*,appender-ref*).

If I attempt to write to the appender, I then get:
log4j:WARN Please set a rolling policy for the RollingFileAppender named 
'logFileAppender'
log4j:ERROR No output stream or file set for the appender named 
[logFileAppender].

I think the issue is that the rollingPolicy element isn't defined in log4j.dtd 
but I'm not sure how to proceed with this.  Is NLOG4J not compatible with the 
companion jar?

Thanks.

___

This e-mail may contain information that is confidential, privileged or 
otherwise protected from disclosure. If you are not an intended recipient of 
this e-mail, do not duplicate or redistribute it by any means. Please delete it 
and any attachments and notify the sender that you have received it in error. 
Unless specifically indicated, this e-mail is not an offer to buy or sell or a 
solicitation to buy or sell any securities, investment products or other 
financial product or service, an official confirmation of any transaction, or 
an official statement of Barclays. Any views or opinions presented are solely 
those of the author and do not necessarily represent those of Barclays. This 
e-mail is subject to terms available at the following link: 
www.barcap.com/emaildisclaimer. By messaging with Barclays you consent to the 
foregoing.  Barclays Capital is the investment banking division of Barclays 
Bank PLC, a company registered in England (number 1026167) with its registered 
office at 1 Churchill Place, London, E14 5HP.  This email may relate to or be 
sent from other members of the Barclays Group.
___


Sanjay Patil is out of the office.

2010-11-03 Thread Sanjay_Patil

I will be out of the office starting  03/11/2010 and will not return until
24/11/2010.

I will respond to your message when I return.

Please email Karl Elliott for any urgent query.

**
This email is confidential and may contain copyright material of the John Lewis 
Partnership. 
If you are not the intended recipient, please notify us immediately and delete 
all copies of this message. 
(Please note that it is your responsibility to scan this message for viruses). 
Email to and from the
John Lewis Partnership is automatically monitored for operational and lawful 
business reasons.
**

John Lewis plc
Registered in England 233462
Registered office 171 Victoria Street London SW1E 5NN
 
Websites: http://www.johnlewis.com 
http://www.waitrose.com 
http://www.johnlewis.com/insurance
http://www.johnlewispartnership.co.uk
 
**


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



Re: Extra RollingFileAppender with NLOG4j

2010-11-03 Thread Jacob Kjome
NLog4j is not an Apache Logging project.  It's a fork of Log4j hosted outside 
of Apache Logging.  Please try with an official Log4j version and respond back 
if you run into issues.


Jake


On Wed, 3 Nov 2010 11:55:29 -0400
 kenneth@barclayscapital.com wrote:
I'm trying to get the RollingFileAppender from the extra log4j companion 
file working but I'm having problems configuring the appender.  I am using 
this with the most current version of NLOG4J


The following is my config file:

?xml version=1.0 encoding=UTF-8 ?
!DOCTYPE log4j:configuration SYSTEM log4j.dtd

log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/;
   appender name=console class=org.apache.log4j.ConsoleAppender
   param name=Target value=System.out/
   layout class=org.apache.log4j.PatternLayout
   param name=ConversionPattern value=%-5p %c{1} - %m%n/
   /layout
   /appender

   appender name=logFileAppender 
class=org.apache.log4j.rolling.RollingFileAppender
   rollingPolicy 
class=org.apache.log4j.rolling.TimeBasedRollingPolicy
   param name=FileNamePattern 
value=/log/metrics.%d{-MM-dd-HH}.log /

   /rollingPolicy
   layout class=org.apache.log4j.PatternLayout
   param name=ConversionPattern value=%m%n /
   /layout
   /appender

   !-- --
   !-- Loggers --
   !-- --
   logger name=com.barcap.eq.common.metric.LoggingMetric 
additivity=false

   level value=INFO /
   appender-ref ref=console /
   appender-ref ref=logFileAppender /
   /logger

   root
   priority value =debug /
   appender-ref ref=console /
   /root

/log4j:configuration


At startup, I get the following errors:
log4j:ERROR Element type rollingPolicy must be declared.
log4j:ERROR The content of element type appender must match 
(errorHandler?,param*,layout?,filter*,appender-ref*).


If I attempt to write to the appender, I then get:
log4j:WARN Please set a rolling policy for the RollingFileAppender named 
'logFileAppender'
log4j:ERROR No output stream or file set for the appender named 
[logFileAppender].


I think the issue is that the rollingPolicy element isn't defined in 
log4j.dtd but I'm not sure how to proceed with this.  Is NLOG4J not 
compatible with the companion jar?


Thanks.

___

This e-mail may contain information that is confidential, privileged or 
otherwise protected from disclosure. If you are not an intended recipient of 
this e-mail, do not duplicate or redistribute it by any means. Please delete 
it and any attachments and notify the sender that you have received it in 
error. Unless specifically indicated, this e-mail is not an offer to buy or 
sell or a solicitation to buy or sell any securities, investment products or 
other financial product or service, an official confirmation of any 
transaction, or an official statement of Barclays. Any views or opinions 
presented are solely those of the author and do not necessarily represent 
those of Barclays. This e-mail is subject to terms available at the following 
link: www.barcap.com/emaildisclaimer. By messaging with Barclays you consent 
to the foregoing.  Barclays Capital is the investment banking division of 
Barclays Bank PLC, a company registered in England (number 1026167) with its 
registered office at 1 Churchill Place, London, E14 5HP.  This email may 
relate to or be sent from other members of the Barclays Group.

___



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