Mercurial > projects > ldc
view gen/logger.h @ 103:855adfdb8d38 trunk
[svn r107] Getting .classinfo on a class instance now works (classinfo is stored in vtable)
author | lindquist |
---|---|
date | Sun, 18 Nov 2007 08:25:07 +0100 |
parents | 61615fa85940 |
children | 5825d48b27d1 |
line wrap: on
line source
#ifndef _llvmd_gen_logger_h_ #define _llvmd_gen_logger_h_ #include <iostream> namespace Logger { void indent(); void undent(); std::ostream& cout(); void println(const char* fmt, ...); void print(const char* fmt, ...); void enable(); void disable(); void attention(const char* fmt, ...); struct LoggerScope { LoggerScope() { Logger::indent(); } ~LoggerScope() { Logger::undent(); } }; } #define LOG_SCOPE Logger::LoggerScope _logscope; #endif