diff options
author | Pixel <pixel@nobis-crew.org> | 2011-10-17 21:02:52 -0700 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2011-10-17 21:02:52 -0700 |
commit | 10d0f503fb68946c265bad18dd755fdc816075c1 (patch) | |
tree | 3c6b02f2f7e27abd42adf580c1b3ecc97386613a /src/Printer.cc | |
parent | 6bd1e79d98f95115c356a9e3e7fdb02dcf221a4e (diff) |
Adding an early version of the 'engine debug' facility.
Diffstat (limited to 'src/Printer.cc')
-rw-r--r-- | src/Printer.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Printer.cc b/src/Printer.cc index ef0cbf5..3190663 100644 --- a/src/Printer.cc +++ b/src/Printer.cc @@ -12,9 +12,10 @@ static const char * prefixes[] = { "(WW) ", "(EE) ", "(AA) ", + "(**) ", }; -Balau::Printer::Printer() : m_verbosity(M_STATUS | M_WARNING | M_ERROR) { +Balau::Printer::Printer() : m_verbosity(M_STATUS | M_WARNING | M_ERROR | M_ENGINE_DEBUG) { if (!localPrinter.getGlobal()) localPrinter.setGlobal(this); } @@ -37,9 +38,11 @@ void Balau::Printer::_log(uint32_t level, const char * fmt, va_list ap) { Printer * printer = getPrinter(); + m_lock.enter(); printer->_print(prefixes[i]); printer->_print(fmt, ap); printer->_print("\n"); + m_lock.leave(); } void Balau::Printer::_print(const char * fmt, va_list ap) { |