summaryrefslogtreecommitdiff
path: root/lib/common
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2008-03-30 02:33:36 +0000
committerChris Wilson <chris+github@qwirx.com>2008-03-30 02:33:36 +0000
commit947d4f202bc72ceff341ae4401ecc9ceb06759c7 (patch)
treea00dd185fffe96d56c21d5c5f91618ce0b112988 /lib/common
parent2e761f8a7744f18059e2048f319f4cac8e32d765 (diff)
Fix a bug where trying to log a variable called "line" would log the address
of the std::ostringstream instead (duh, I hate macros).
Diffstat (limited to 'lib/common')
-rw-r--r--lib/common/Logging.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/common/Logging.h b/lib/common/Logging.h
index dafafbbd..2c967c89 100644
--- a/lib/common/Logging.h
+++ b/lib/common/Logging.h
@@ -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)