logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vic Simkus" <vic.sim...@gmail.com>
Subject NTEventLogAppender events not showing.
Date Tue, 27 Nov 2007 03:08:47 GMT
Hello

I'm trying to programmatically configure the NT event log appender and
having zero luck.  Everything compiles but there are no entries in the
  event viewer.  Bellow is the code.  What am I missing here?

log4cxx::nt::NTEventLogAppender * ntAppender = new
log4cxx::nt::NTEventLogAppender();
ntAppender->setSource(L"Source");
ntAppender->setName(L"ntlogappender");
ntAppender->setLayout(log4cxx::LayoutPtr(new log4cxx::SimpleLayout()));

log4cxx::BasicConfigurator::configure(log4cxx::AppenderPtr(ntAppender));
log4cxx::Logger::getRootLogger()->setLevel(log4cxx::Level::getDebug());
logger = log4cxx::Logger::getLogger("logger");

LOG4CXX_INFO(logger,"Created NTEventLogAppender contingency appender");



-- 
Men never do evil so completely and cheerfully as when they do it from
religious conviction.

-Blaise Pascal

Mime
View raw message