logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lars Schouw <schou...@yahoo.com>
Subject You have tried to set a null level to root.
Date Thu, 20 May 2004 07:14:57 GMT
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 <log4cxx/logger.h>
#include <log4cxx/basicconfigurator.h>
#include <log4cxx/propertyconfigurator.h>
#include <log4cxx/helpers/exception.h>

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 

Mime
View raw message