logging-log4cxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carn...@apache.org
Subject cvs commit: logging-log4cxx/src fileappender.cpp
Date Thu, 10 Feb 2005 08:41:59 GMT
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
     }
   }
   
  
  
  

Mime
View raw message