logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Schuetze <schue...@geoinform.fh-mainz.de>
Subject Logstream failed with std::string
Date Mon, 05 Dec 2005 16:42:28 GMT

I tried to log a std::string to a logstream, but it failed: Regarding 
the posting on :

I make a work-around which is attended below. The implementation on the 
logstream class works fine for me, but I suppose there must be a more 
elegant solution for this problem.

in the stream.h:
LOG4CXX_EXPORT ::log4cxx::logstream& operator<<(
    ::log4cxx::logstream& lhs,
    const ::std::string& rhs);

in the logstream.cpp
::log4cxx::logstream& operator<<(
    ::log4cxx::logstream& lhs,
    const ::std::string& rhs) {
	return lhs << rhs.c_str();


View raw message