log4j:WARN No appenders could be found for logger

Home Forums Archived Forums MyEclipse Archived Web Services log4j:WARN No appenders could be found for logger

This topic contains 5 replies, has 3 voices, and was last updated by Profile photo of Riyad Kalla Riyad Kalla 8 years, 7 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #257811
    Profile photo of ISCAR387001
    ISCAR387001
    Member

    When I press on Debbug Server I get the following error:
    log4j:WARN No appenders could be found for logger (org.codehaus.xfire.transport.http.XFireConfigurableServlet).
    log4j:WARN Please initialize the log4j system properly.
    What I need to do to resolve this problem?

    Environment:
    MyEclilpse 5.0.1 GA
    Eclilpse 3.2
    Weblogic 8.1 SP4

    #257868
    Profile photo of Riyad Kalla
    Riyad Kalla
    Member

    This is just a warning that log4j has no configuration file in the classpath, you can learn more about htem here: http://logging.apache.org/log4j/docs/manual.html

    #259261
    Profile photo of John
    John
    Member

    In a web service, that warning is given every time the web service is hit, even if I’ve implemented logging of my own for the web service. If the web service is hit a lot, that really clutters up the console. So, is there a way to disable that warning?

    #259263
    Profile photo of Riyad Kalla
    Riyad Kalla
    Member

    You can either get rid of log4j, or place a log4j.properties file (as explained in the link above) that defines a single appender of some kind… I’m not sure if log4j offers “null” appenders to just eat the output. Or just set the logging sufficiently high for the component you don’t want to see the notice from.

    These are really log4j-specific questions.

    #259480
    Profile photo of John
    John
    Member

    I could easily set the logger level to “OFF” but I’ve tried placing a log4j.properties file at various locations throughout my project/deployment, and it doesn’t seem to be found by whatever is looking for it.

    Either way, that’s kind of a kludge, and I’d prefer to just drop log4j altogether, but it appears to be tightly coupled to your “XFire 1.1 Core Libraries”, which I appear to need for my web service. It shouldn’t be the case that log4j is required if I want a web service; is there any way this could be looked into for future releases, or can you discuss how to configure XFire such that it doesn’t bring log4j along for the ride?

    #259500
    Profile photo of Riyad Kalla
    Riyad Kalla
    Member

    Unfortunately this is just the case with a lot of frameworks today, if they are written against a logging framework there is nothing you can do, using an OFF appender isn’t a kludge, it’s just an instruction for the logging library that XFire uses.

    If XFire is actually using commons-logging and not log4j explicitly, I think you can redirect the output to a JDK logger, I just don’t know offhand how to do this.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.