You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-dev@logging.apache.org by ca...@apache.org on 2005/02/10 09:41:59 UTC
cvs commit: logging-log4cxx/src fileappender.cpp
carnold 2005/02/10 00:41:59
Modified: src fileappender.cpp
Log:
LOGCXX-58: Immediate flush'd FileAppenders extremely slow on Windows
Revision Changes Path
1.20 +5 -4 logging-log4cxx/src/fileappender.cpp
Index: fileappender.cpp
===================================================================
RCS file: /home/cvs/logging-log4cxx/src/fileappender.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- fileappender.cpp 2 Jan 2005 05:40:04 -0000 1.19
+++ fileappender.cpp 10 Feb 2005 08:41:59 -0000 1.20
@@ -168,10 +168,11 @@
void FileAppender::subAppend(const char* encoded, log4cxx_size_t size, Pool& p) {
if (ofs != NULL) {
- apr_status_t rv = apr_file_write(ofs, encoded, &size);
- if (rv == APR_SUCCESS && immediateFlush) {
- rv = apr_file_flush(ofs);
- }
+ apr_file_write(ofs, encoded, &size);
+ //
+ // do not call apr_file_flush here as it is a no-op
+ // on Unix and wildly expensive on Windows.
+ // See LOGCXX-58 for details
}
}