Am Freitag, 17. Dezember 2004 01:07 schrieb Curt Arnold:
> On Dec 16, 2004, at 5:12 PM, Tommi M�kitalo wrote:
> > Hi again,
> >
> > why there is a empty line between each log-message? Here is how the
> > output of
> > example/trivia looks like:
>
> Looks like I probably added a \n that didn't need to be there. This
> should cause a test failure when I'm able to run more than a few tests
> without crashing.
>
I found the \n (or better std::endl). Here is the patch.
Tommi
Index: consoleappender.cpp
===================================================================
RCS file: /home/cvspublic/logging-log4cxx/src/consoleappender.cpp,v
retrieving revision 1.10
diff -u -r1.10 consoleappender.cpp
--- consoleappender.cpp 17 Dec 2004 01:36:04 -0000 1.10
+++ consoleappender.cpp 18 Dec 2004 22:30:57 -0000
@@ -126,9 +126,9 @@
std::wstring wmsg;
log4cxx::helpers::Transcoder::encode(msg, wmsg);
if (useErr) {
- std::wcerr << wmsg << std::endl;
+ std::wcerr << wmsg << std::flush;
} else {
- std::wcout << wmsg << std::endl;
+ std::wcout << wmsg << std::flush;
}
}