logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From BUSCHART Rufus SGI <Rufus.Busch...@framatome-anp.com>
Subject Using log4cxx with std::cout under MFC
Date Tue, 08 Feb 2005 14:00:33 GMT
Hi Guys,

I would like to have log4cxx to send the logging-messages to std::cout. I'm
using log4cxx under MS VC++ and have cout redirected to a console window. I
do have the following lines in my .h file

#include <log4cxx/logger.h>
#include <log4cxx/basicconfigurator.h>
#include <log4cxx/helpers/exception.h>
using namespace std;
using namespace log4cxx;
using namespace log4cxx::helpers;

static LoggerPtr logger(Logger::getLogger("ATXImporteur"));

and in the corresponding .cpp file


I was hoping this would log the message "Test" to the console but
unfortunately nothing happens. Do you have any ideas what to do? Of course
the program compiles and links well and cout << "Test" << endl; works fine

Thanks and best regards,

Rufus Buschart

Rufus J.W. Buschart                        Framatome ANP 

Framatome ANP GmbH 
Freyeslebenstra├če 1 
Geb├Ąude 86 / 2014 
91058 Erlangen S F 
Tel.:    + 49 9131 1892618 
Fax.:   + 49 9131 1894814 
Mobil: + 49 178 5929315 
e-mail: rufus.buschart@framatome-anp.com 

View raw message