aboutsummaryrefslogtreecommitdiffstats
path: root/yage/include/yage/logger.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'yage/include/yage/logger.hpp')
-rw-r--r--yage/include/yage/logger.hpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/yage/include/yage/logger.hpp b/yage/include/yage/logger.hpp
new file mode 100644
index 0000000..36c7b9b
--- /dev/null
+++ b/yage/include/yage/logger.hpp
@@ -0,0 +1,24 @@
+#ifndef LOGGER_HPP
+#define LOGGER_HPP
+
+#include <string>
+
+class Logger
+{
+public:
+ template<typename Tail>
+ static std::string log(std::ostream &out, Tail &&tail)
+ {
+ out<<tail;
+ }
+
+ template<typename Head, typename... Tail>
+ static std::string log(std::ostream &out, Head &&head, Tail &&...tail)
+ {
+ out<<std::forward<Head>(head);
+ log(out, std::forward<Tail>(tail)...);
+ }
+};
+
+
+#endif