Gary,

My app has mixed code some classes using slf4j, some using log4j and some
using jdk commons logging, so I am trying to figure out, what is the best
way to merge to log4j version 2.

I am getting the log4j-beta04-bin.   When I am binding different binaries,
I am getting different errors.  I have resolved the MDC error by modifying
ThreadContext.put();

Yogi


On Fri, Feb 8, 2013 at 4:41 AM, Gary Gregory <[email protected]> wrote:

> What file did you download and run to get this? Or what is from a svn tag?
>
> Gary
>
> On Feb 7, 2013, at 17:16, Yogi Nerella <[email protected]> wrote:
>
> > Hi,
> >
> > Any one seeing this error?
> >
> > All log4j.xml files I am using are from the sample code only.
> >
> > Thanks,
> > Yogi
> >
> > log4j:WARN Continuable parsing error 2 and column 108
> > log4j:WARN Document root element "log4j:configuration", must match
> DOCTYPE
> > root "null".
> > log4j:WARN Continuable parsing error 2 and column 108
> > log4j:WARN Document is invalid: no grammar found.
> > log4j:WARN Unrecognized element appenders
> > log4j:WARN Unrecognized element loggers
> > log4j:WARN No appenders could be found for logger (log.Log4jLogger).
> > log4j:WARN Please initialize the log4j system properly.
> > log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for
> > more info.
> > Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.103 sec
> > <<< FAILURE!
> > testHelloLogger(log.TestLog4jLogger)  Time elapsed: 0.089 sec  <<< ERROR!
> > java.lang.NoSuchMethodError:
> > org.apache.log4j.MDC.put(Ljava/lang/String;Ljava/lang/String;)V
> >        at log.Log4jLogger.addMyContext(Log4jLogger.java:45)
> >        at log.TestLog4jLogger.testHelloLogger(TestLog4jLogger.java:13)
> >
> > Running log.TestSLF4jLogger
> > Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec
> >
> > Results :
> >
> > Tests in error:
> >  TestLog4jLogger.testHelloLogger:13 ╗ NoSuchMethod
> > org.apache.log4j.MDC.put(Lja...
> >
> > Tests run: 2, Failures: 0, Errors: 1, Skipped: 0
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to