diff options
author | Philipp Lohmann [pl] <Philipp.Lohmann@Sun.COM> | 2009-11-10 16:27:35 +0100 |
---|---|---|
committer | Philipp Lohmann [pl] <Philipp.Lohmann@Sun.COM> | 2009-11-10 16:27:35 +0100 |
commit | 2a00316c1cfb9fee87ed6b49b9e4565642f4be2b (patch) | |
tree | 35425ec69160fb28baa3cac383d5c0afaac1b487 /extensions/source | |
parent | 34cd75ba9901e55f641ed8e22f3f9895a5c57f16 (diff) | |
parent | e76dcc39bd144789124272efc41d4823a672e284 (diff) |
merge with DEV300_m64
Diffstat (limited to 'extensions/source')
-rw-r--r-- | extensions/source/logging/filehandler.cxx | 11 | ||||
-rw-r--r-- | extensions/source/logging/logger.cxx | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/extensions/source/logging/filehandler.cxx b/extensions/source/logging/filehandler.cxx index 97d6d7524290..e04ea8faf0be 100644 --- a/extensions/source/logging/filehandler.cxx +++ b/extensions/source/logging/filehandler.cxx @@ -328,7 +328,16 @@ namespace logging void SAL_CALL FileHandler::flush( ) throw (RuntimeException) { MethodGuard aGuard( *this ); - // nothing to do, our ::osl::File implementation is not buffered + if(!m_pFile.get()) + { + OSL_PRECOND(false, "FileHandler::flush: no file!"); + return; + } + #if OSL_DEBUG_LEVEL > 0 + ::osl::FileBase::RC res = + #endif + m_pFile->sync(); + OSL_ENSURE(res == ::osl::FileBase::E_None, "FileHandler::flush: Could not sync logfile to filesystem."); } //-------------------------------------------------------------------- diff --git a/extensions/source/logging/logger.cxx b/extensions/source/logging/logger.cxx index 69ae5fced483..66e0eb540ef0 100644 --- a/extensions/source/logging/logger.cxx +++ b/extensions/source/logging/logger.cxx @@ -230,6 +230,8 @@ namespace logging m_aHandlers.forEach< XLogHandler >( ::boost::bind( &XLogHandler::publish, _1, ::boost::cref( _rRecord ) ) ); + m_aHandlers.forEach< XLogHandler >( + ::boost::bind( &XLogHandler::flush, _1 ) ); } //-------------------------------------------------------------------- |