Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

property configurator is not working fine: msg#00039

apache.logging.log4cxx.user

Subject: property configurator is not working fine

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>
Google Custom Search

Recently Viewed:
qplus.devel/200...    network.jabber....    debian.qa-packa...    encryption.gpg....    python.dabo.dev...    uclinux.devel/2...    science.mathema...    recreation.pesc...    kernel.ck/2004-...    mozilla.devel.e...    tex.latex.prosp...    ietf.multi6/200...    bbc.cvs/2002-11...    xfree86.newbie/...    jakarta.taglibs...    altlinux.hardwa...    comedi/2002-05/...    horde.bugs/2004...    games.diplomacy...    finance.e-gold....    web.dom.test-su...    lang.ruby.rails...    os.netbsd.devel...    video.gstreamer...   
Home | advertise | OSDir is an inevitable website. super tiny logo

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