summaryrefslogtreecommitdiff
path: root/src/include/debug.hpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2015-03-17 21:49:49 +0800
committerJohn Hodge <tpg@mutabah.net>2015-03-17 21:49:49 +0800
commit3ebea363b19e933df06faf7c1d1ad5d4251c2ca3 (patch)
tree73e47917296dd7411cc49ae8a959d25c3838619b /src/include/debug.hpp
parent0c2d1d043d71450ea5087937c97af4c12c6d33fc (diff)
downloadmrust-3ebea363b19e933df06faf7c1d1ad5d4251c2ca3.tar.gz
Rework handling of blocks, add sub-modules
Diffstat (limited to 'src/include/debug.hpp')
-rw-r--r--src/include/debug.hpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/include/debug.hpp b/src/include/debug.hpp
index 11301d27..39af8ab0 100644
--- a/src/include/debug.hpp
+++ b/src/include/debug.hpp
@@ -34,8 +34,12 @@ class TraceLog
{
const char* m_tag;
public:
+ TraceLog(const char* tag, ::std::string info): m_tag(tag) {
+ DEBUG(" >> " << m_tag << "(" << info << ")");
+ INDENT();
+ }
TraceLog(const char* tag): m_tag(tag) {
- DEBUG(">> " << m_tag);
+ DEBUG(" >> " << m_tag);
INDENT();
}
~TraceLog() {
@@ -44,5 +48,6 @@ public:
}
};
#define TRACE_FUNCTION TraceLog _tf_(__func__)
+#define TRACE_FUNCTION_F(ss) TraceLog _tf_(__func__, FMT(ss))