log4j - ConversionPattern not working?

Discussions

General J2EE: log4j - ConversionPattern not working?

  1. log4j - ConversionPattern not working? (1 messages)

    Hi all,

    Log4j is aggravating me. Here is my properties file:
    log4j.logger.org.majere.ejblog=DEBUG, A1
    log4j.appender.A1=org.apache.log4j.FileAppender
    log4j.appender.A1.File=D\:\\\\Development\\\\ejblog\\\\logs\\\\ejblog.log
    log4j.appender.A1.ConversionPattern=%d{dd MMM yyyy | HH\:mm\:ss,SSS} | %c | %p | %m%n
    log4j.appender.A1.layout=org.apache.log4j.PatternLayout
    However, my log entries don't have the date, or class name, or anything. It has only the %m%n part. I've tried other ConversionPatterns, still to no avail.

    Am I missing something here?

    Thanks!

    Joe
  2. hi,

    Conversion Pattern follows C printf format.

    The following link has legal conversion pattern

    for the appender.

    check out :

    http://www.vipan.com/htdocs/log4jhelp.html

    Bhagvan K
    http://www.architectcorner.com