[Box Backup-commit] COMMIT r2120 - box/trunk/lib/common
boxbackup-dev@fluffy.co.uk
boxbackup-dev@fluffy.co.uk
Sun, 30 Mar 2008 02:33:37 +0000 (UTC)
Author: chris
Date: 2008-03-30 02:33:36 +0000 (Sun, 30 Mar 2008)
New Revision: 2120
Modified:
box/trunk/lib/common/Logging.h
Log:
Fix a bug where trying to log a variable called "line" would log the address
of the std::ostringstream instead (duh, I hate macros).
Modified: box/trunk/lib/common/Logging.h
===================================================================
--- box/trunk/lib/common/Logging.h 2008-03-29 01:56:39 UTC (rev 2119)
+++ box/trunk/lib/common/Logging.h 2008-03-30 02:33:36 UTC (rev 2120)
@@ -27,16 +27,16 @@
#define BOX_LOG(level, stuff) \
{ \
- std::ostringstream line; \
- line << stuff; \
- Logging::Log(level, __FILE__, __LINE__, line.str()); \
+ std::ostringstream _box_log_line; \
+ _box_log_line << stuff; \
+ Logging::Log(level, __FILE__, __LINE__, _box_log_line.str()); \
}
#define BOX_SYSLOG(level, stuff) \
{ \
- std::ostringstream line; \
- line << stuff; \
- Logging::LogToSyslog(level, __FILE__, __LINE__, line.str()); \
+ std::ostringstream _box_log_line; \
+ _box_log_line << stuff; \
+ Logging::LogToSyslog(level, __FILE__, __LINE__, _box_log_line.str()); \
}
#define BOX_FATAL(stuff) BOX_LOG(Log::FATAL, stuff)