log4cxx::StringBuffer& operator<<(log4cxx::StringBuffer& oss, const wchar_t* str) {
// would need to call wcstombs or similar and insert into StringBuffer
}
With the CVS_HEAD
LOG4CXX_INFO(logger, std::wstring(L"BufferReader::Readstring, data :") + v);
On Apr 12, 2005, at 4:22 AM, Staffan Vilcans wrote:
I'm using log4cxx 0.9.7 and I have read a wstring into v and want to output it to the log. I do like:
::log4cxx::StringBuffer oss;
oss << "BufferReader::Readstring, data : " << v.c_str();
However in the output I get
18845 [3209966400] INFO whine - BufferReader::ReadString, data : 0x81f89cc
i.e. I get the pointer and not the string like I would hope. I have tried a few other methods, but with no luck.
How should I do to output a wstring?
-- Cell: +46 737 282 486 Phone: +46 8 442 75 94 (ext 242) Fax: +46 8 24 05 08 www.jadestone.se Björns Trädgårdsgränd 1, 116 21 Stockholm, Sweden