mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-13 03:13:13 +01:00
Initial commit after moving to Tango instead of Phobos. Lots of bugfixes... This build is not suitable for most things.
38 lines
618 B
C++
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
|
|
|