summaryrefslogtreecommitdiff
path: root/i/marvin/src/log
diff options
context:
space:
mode:
Diffstat (limited to 'i/marvin/src/log')
-rw-r--r--i/marvin/src/log/logger.hh13
1 files changed, 12 insertions, 1 deletions
diff --git a/i/marvin/src/log/logger.hh b/i/marvin/src/log/logger.hh
index 5bb8e42..cc47095 100644
--- a/i/marvin/src/log/logger.hh
+++ b/i/marvin/src/log/logger.hh
@@ -46,7 +46,7 @@ class Logger
/// Output a integer.
virtual Logger &operator<< (int i) = 0;
/// Output a double.
- virtual Logger &operator << (double d) = 0;
+ virtual Logger &operator<< (double d) = 0;
/// TODO vector
protected:
@@ -54,4 +54,15 @@ class Logger
Logger (void) { }
};
+#include <sstream>
+
+template<typename T>
+Logger &operator<< (Logger &l, const T &v)
+{
+ std::ostringstream ss;
+ ss << v;
+ l << ss.str ();
+ return l;
+}
+
#endif // logger_hh