logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lars Schouw <schou...@yahoo.com>
Subject Re: You have tried to set a null level to root.
Date Thu, 20 May 2004 07:23:54 GMT
Sorry forgot to tell that I also have a static variable declared in a header file

static log4cxx::LoggerPtr logger;


Lars Schouw <schouwla@yahoo.com> wrote:
I tried to add a configuration file to my project but
when I run it I get this error:
You have tried to set a null level to root.
and an exception it thrown.
This is before I even hit the main function so it must
belong to the static variable I declared the is
initialized when the object is loaded.

My souce code:

// include log4cxx header files.
#include 
#include 
#include 
#include 

using namespace log4cxx;
using namespace log4cxx::helpers;

// Define a static logger variable so that it
references the logger instance named "RALtest".
LoggerPtr logger = Logger::getLogger(_T("RALtest"));

int main(int argc, char* argv[])
{
int result = EXIT_SUCCESS;
try
{
if (argc > 1)
{
USES_CONVERSION;
String propertyFileName = argv[1];
PropertyConfigurator::configure(propertyFileName);
}
else
{
BasicConfigurator::configure();
}

logger->info(_T("Entering RALtest application."));
....

Lars









__________________________________
Do you Yahoo!?
Yahoo! Domains  Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer 
		
---------------------------------
Do you Yahoo!?
Yahoo! Domains - Claim yours for only $14.70/year
Mime
View raw message