Regarding the "null level to root" issue - I found it to be a symptom of the order of initialization of objects in the library. I believe it has been discussed before - the log4cxx-user mailing list archives have some mention of it under the context of static library problems.
I poked around in a debugger when I was getting it and found that sometimes the static members on the Level class that define the logging levels (i.e. Level::OFF, Level::DEBUG, etc) can be requested by the application before the module that they reside in has been initialized. So instead of a pointer to a new Level Object, asking for Level:OFF just gives you null and that causes the error. If I re-ordered the link line so that level.o and logmamager.o came first and it went away. Additionally if you've got something calling log4cxx during pre-main initialization in a shared library environment, make sure the log4cxx library comes first in the link line. I have not found a good answer to the "single configuration file" question yet myself. Maybe it's intended to be left up to the user of log4cxx to configure. Later, Mike -----Original Message----- From: Surekha Guntur [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 01, 2004 4:35 PM To: [email protected] Subject: Error: You have tried to set a null level to root Hi, I am trying to run a sample example 'trivial' (in src/exapmles) I get the following error on Solaris. It just has BasicConfigurator. -------- You have tried to set a null level to root. Segmentation Fault (core dumped) -------- Any ideas please... I am using log4cxx-0.9.7 version. Do I need to supply any configuration file or set any environment variables. I tried to set log4j.configuration environment variable. But it does not take it as it has '.' (dot) in it. Has anyone come across this problem? Thanks, Surekha. Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages!
