|
Hi,
I'm using an external appender(user-defined), but when
i give the entire package namein the property file, I have created the jar
and set it in the classpath also. But then, it does'nt work. It gives me the
following error....
log4j: Parsing for [root] with value=[DEBUG,
R].
log4j: Level token is [DEBUG]. log4j: Category root set to DEBUG log4j: Parsing appender named "R". log4j: Parsing layout options for "R". log4j: Setting property [conversionPattern] to [%d{dd-MMM-yyyy HH:mm:ss} %6p - %m %n]. log4j: End of parsing for "R". log4j: Setting property [file] to [logs/debug.log]. Exception in thread "main" java.lang.IllegalArgumentException: Illegal pattern character 'l' at java.text.SimpleDateFormat.compile(SimpleDateFormat.java:675) at java.text.SimpleDateFormat.initialize(SimpleDateFormat.java:494) at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:443) at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:424) at sps.log.log4j.DateFormatFileAppender.setFile(DateFormatFileAppender.java:78) at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:163) at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:256) at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:132) at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:96) at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:654) at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:612) at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:509) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:415) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:316) at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:324) at RollType.main(RollType.java:7) Here is my property file,
log4j.debug=true
log4j.rootLogger=DEBUG, R log4j.logger.debugLogger=R log4j.appender.R=sps.log.log4j.DateFormatFileAppender log4j.appender.R.File=logs/debug.log log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%d{dd-MMM-yyyy HH\:mm\:ss} %6p - %m %n James, this is your program.
Thanks &
Regards,
Kailash.K.N. |
******* DISCLAIMER: This email and any files transmitted with it are privileged and confidential information and intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Torry Harris Business Solutions has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. The recipient should check this email and any attachments for the presence of viruses. THBS reserves the right to monitor and review the content of all messages sent to or from this e-mail address********
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
