summaryrefslogtreecommitdiff
path: root/lib/common/Logging.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/common/Logging.h')
-rw-r--r--lib/common/Logging.h33
1 files changed, 8 insertions, 25 deletions
diff --git a/lib/common/Logging.h b/lib/common/Logging.h
index 2c967c89..2d726627 100644
--- a/lib/common/Logging.h
+++ b/lib/common/Logging.h
@@ -27,16 +27,16 @@
#define BOX_LOG(level, stuff) \
{ \
- std::ostringstream _box_log_line; \
- _box_log_line << stuff; \
- Logging::Log(level, __FILE__, __LINE__, _box_log_line.str()); \
+ std::ostringstream line; \
+ line << stuff; \
+ Logging::Log(level, __FILE__, __LINE__, line.str()); \
}
#define BOX_SYSLOG(level, stuff) \
{ \
- std::ostringstream _box_log_line; \
- _box_log_line << stuff; \
- Logging::LogToSyslog(level, __FILE__, __LINE__, _box_log_line.str()); \
+ std::ostringstream line; \
+ line << stuff; \
+ Logging::LogToSyslog(level, __FILE__, __LINE__, line.str()); \
}
#define BOX_FATAL(stuff) BOX_LOG(Log::FATAL, stuff)
@@ -48,32 +48,15 @@
if (Logging::IsEnabled(Log::TRACE)) \
{ BOX_LOG(Log::TRACE, stuff) }
-#define BOX_LOG_SYS_WARNING(stuff) \
- BOX_WARNING(stuff << ": " << strerror(errno) << " (" << errno << ")")
-#define BOX_LOG_SYS_ERROR(stuff) \
- BOX_ERROR(stuff << ": " << strerror(errno) << " (" << errno << ")")
-#define BOX_LOG_SYS_FATAL(stuff) \
- BOX_FATAL(stuff << ": " << strerror(errno) << " (" << errno << ")")
-
-#ifdef WIN32
- #define BOX_LOG_WIN_ERROR(stuff) \
- BOX_ERROR(stuff << ": " << GetErrorMessage(GetLastError()))
- #define BOX_LOG_WIN_ERROR_NUMBER(stuff, number) \
- BOX_ERROR(stuff << ": " << GetErrorMessage(number))
-#endif
-
-#define BOX_FORMAT_HEX32(number) \
+#define BOX_FORMAT_ACCOUNT(accno) \
std::hex << \
std::showbase << \
std::internal << \
std::setw(10) << \
std::setfill('0') << \
- (number) << \
+ (accno) << \
std::dec
-#define BOX_FORMAT_ACCOUNT(accno) \
- BOX_FORMAT_HEX32(accno)
-
#define BOX_FORMAT_OBJECTID(objectid) \
std::hex << \
std::showbase << \