|
|
Choosing A Webhost: |
property configurator is not working fine: msg#00039apache.logging.log4cxx.user
Hi! In my project,currently trying to to implement log4cxx9.8(Using vc++6.0). Still i cant run even the sample codings given by log4cxx maual.There is no error displaying,but program is still crashing.I tryed to debug but the execution would go upto LOG4CXX_INFO(logger, "Entering application."); like macro statement,then crashed.I dont know what is the problem sample codings given below // file MyApp.cpp #include "com/foo/bar.h" using namespace com::foo; // include log4cxx header files. #include <log4cxx/logger.h> #include <log4cxx/basicconfigurator.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 "MyApp". LoggerPtr logger(Logger::getLogger("MyApp")); int main(int argc, char **argv) { int result = EXIT_SUCCESS; try { // Set up a simple configuration that logs on the console. BasicConfigurator::configure(); LOG4CXX_INFO(logger, "Entering application."); Bar bar; bar.doIt(); LOG4CXX_INFO(logger, "Exiting application."); } catch(Exception&) { result = EXIT_FAILURE; } return result; // file <com/foo/bar.h> #include <log4cxx/logger.h> namespace com { namespace foo { class Bar { static log4cxx::LoggerPtr logger; public: void doIt(); }; }; }; // file <bar.cpp> #include "com/foo/bar.h" using namespace com::foo; using namespace log4cxx; LoggerPtr Bar::logger(Logger::getLogger("com.foo.bar")); void Bar::doIt() { LOG4CXX_DEBUG(logger, "Did it again!"); } Thanks in advance
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Configuration file implementation, Anoop George Philip |
|---|---|
| Next by Date: | DailyRollingFileAppender Changing Default Rolled File Name Behaviour, alan.behrsing |
| Previous by Thread: | Configuration file implementation, Anoop George Philip |
| Next by Thread: | DailyRollingFileAppender Changing Default Rolled File Name Behaviour, alan.behrsing |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive 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 |