You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by bu...@apache.org on 2005/09/14 13:19:05 UTC

DO NOT REPLY [Bug 36654] New: - Provide better error messages for "Please initialize the log4j system properly"

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36654>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36654

           Summary: Provide better error messages for "Please initialize the
                    log4j system properly"
           Product: Log4j
           Version: 1.2
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Other
        AssignedTo: log4j-dev@logging.apache.org
        ReportedBy: hauser@acm.org


Happens with v. 1.2.9 and 1.2.12

Under Eclipse - Debug, all of a sudden log4j stopped working and I get on the
console
<<log4j:WARN No appenders could be found for logger (com.domain.test.TestSuite).
log4j:WARN Please initialize the log4j system properly.>>

Ok, I upgraded to log4j-1.3alpha-6.jar and got
<<*** configurationOptionStr=null
** End of LogManager static initializer
log4j:INFO Creating new logger [com.domain.test.TestSuite] in repository
[default].>>
but still no log.debug statements were honoured.

The log4j.properties is in the usual place and has among others the following
entries:
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.logger.com.domain = DEBUG, stdout

in org.apache.log4j.LogManager of the CVS HEAD, I saw the test for 
String debugProp = System.getProperty("log4j.debug");

but doing 
   System.setProperty("log4j.debug", "true");
in TestSuite.main() is obviously too late if I do as the first statement in the
class
  static Logger log = Logger.getLogger(TestSuite.class);
Setting this "log4j.debug" variable to true in eclipe's Debug-Environment didn't
make that more verbose either (I'm still hoping to see "**Start of LogManager
static initializer").

Anyway, I went down and finally found the reason - the log4j.properties
apparently also needs to be in a second place.

What I would hope for that log4j would volunteer to say where it was searching
in vane!

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org