[Box Backup-commit] COMMIT r1368 - box/chris/general/lib/common
boxbackup-dev at fluffy.co.uk
boxbackup-dev at fluffy.co.uk
Mon Mar 5 00:02:37 GMT 2007
Author: chris
Date: 2007-03-05 00:02:37 +0000 (Mon, 05 Mar 2007)
New Revision: 1368
Modified:
box/chris/general/lib/common/FileStream.cpp
Log:
Use logging framework
Modified: box/chris/general/lib/common/FileStream.cpp
===================================================================
--- box/chris/general/lib/common/FileStream.cpp 2007-03-05 00:02:03 UTC (rev 1367)
+++ box/chris/general/lib/common/FileStream.cpp 2007-03-05 00:02:37 UTC (rev 1368)
@@ -10,6 +10,7 @@
#include "Box.h"
#include "FileStream.h"
#include "CommonException.h"
+#include "Logging.h"
#include <errno.h>
@@ -73,8 +74,7 @@
#endif
{
MEMLEAKFINDER_NOT_A_LEAK(this);
- ::syslog(LOG_ERR, "FileStream: called with invalid "
- "file handle");
+ BOX_ERROR("FileStream: called with invalid file handle");
THROW_EXCEPTION(CommonException, OSFileOpenError)
}
#ifdef WIN32
@@ -98,7 +98,7 @@
if(mOSFileHandle < 0)
{
MEMLEAKFINDER_NOT_A_LEAK(this);
- ::syslog(LOG_ERR, "FileStream: copying unopened file");
+ BOX_ERROR("FileStream: copying unopened file");
THROW_EXCEPTION(CommonException, OSFileOpenError)
}
}
@@ -156,8 +156,8 @@
}
else
{
- ::syslog(LOG_ERR, "Failed to read from file: error %d",
- GetLastError());
+ BOX_ERROR("Failed to read from file: " <<
+ GetErrorMessage(GetLastError()));
r = -1;
}
#else
More information about the Boxbackup-commit
mailing list