Files
ldc/gen/logger.h
Tomas Lindquist Olsen b15b3484c8 [svn r136] MAJOR UNSTABLE UPDATE!!!
Initial commit after moving to Tango instead of Phobos.

Lots of bugfixes...

This build is not suitable for most things.
2008-01-11 17:57:40 +01:00

38 lines
618 B
C++

#ifndef _llvmd_gen_logger_h_
#define _llvmd_gen_logger_h_
#include <iostream>
struct Loc;
namespace Logger
{
void indent();
void undent();
std::ostream& cout();
void println(const char* fmt, ...);
void print(const char* fmt, ...);
void enable();
void disable();
bool enabled();
void attention(const Loc& loc, const char* fmt, ...);
struct LoggerScope
{
LoggerScope()
{
Logger::indent();
}
~LoggerScope()
{
Logger::undent();
}
};
}
#define LOG_SCOPE Logger::LoggerScope _logscope;
#endif