logo       

Sponsor
FREE Network Mapping Tool for Microsoft® Office Visio® Professional 2007
Don't map your network by hand - let LANsurveyor Exx press for Microsoft Visio Professional 2007 automatically create network diagrams for you!

I degrade some softwares on my computer, and now I can build log4 cxx on So: msg#00022

apache.logging.log4cxx.user

Subject: I degrade some softwares on my computer, and now I can build log4 cxx on Solaris 9 x86 now. But...

Hello, everybody,
I degrade my automake from 1.9.2 to 1.6.3, and libtool from 1.5.10 to 1.4.3.
This time, I successfully build log4cxx-0.9.7 on Solaris 9 x86. (Although I
already build one by writing a makefile for it, ^_^.).
But when I build and run a demo program with it, I got the following error
message:

david@billdavid>log4cxxtest test.properties
You have tried to set a null level to root.
Segmentation Fault(coredump)

I have ever test the same program with the shared library built from my
makefile. It runs very well.
I find the above output message "You have tried to set a null level to root.
" in RootCategory.cpp. But I don't know what it means.
Can anybody give me some suggestion?

The following is my program:

#include <log4cxx/logger.h>
#include <log4cxx/basicconfigurator.h>
#include <log4cxx/helpers/exception.h>
#include <log4cxx/propertyconfigurator.h>
#include <log4cxx/xml/domconfigurator.h>
#include <log4cxx/helpers/loglog.h>

using namespace log4cxx;
using namespace log4cxx::helpers;
using namespace log4cxx::xml;

LoggerPtr logger = Logger::getLogger(_T("MyApp"));

class Bar
{
static log4cxx::LoggerPtr logger;

public:
void doIt();
};


LoggerPtr Bar::logger = Logger::getLogger(_T("MyApp"));

void Bar::doIt()
{
logger->debug(_T("Did it again!"));
}


int main(int argc, char **argv)
{
int result = EXIT_SUCCESS;

try
{
PropertyConfigurator::configure(argv[1]);

logger->info(_T("Entering application."));
Bar bar;
bar.doIt();
logger->info(_T("Exiting application."));

LOG4CXX_DEBUG(logger, _T("error message"));
LOG4CXX_LOG(logger, Level::INFO, _T("fatal message"));
}
catch(Exception&)
{
result = EXIT_FAILURE;
}

return result;
}

Regards,

Bill David
2004.10.19



<Prev in Thread] Current Thread [Next in Thread>
Sponsor
FREE Network Mapping Tool for Microsoft® OfficeVisio Professional 2007
Don't map your network by hand - let LANsurveyor Express for Microsoft Visio Professional 2007
automatically create network diagrams for you!
Google Custom Search

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation

Home | sitemap | advertise | OSDir is an inevitable website. super tiny logo