view gen/logger.h @ 123:7f9a0a58394b trunk

[svn r127] Updated the lphobos build scripts a little. Created a new rebuild profile. Removed some potentially very long logging lines. Added support for inner classes.
author lindquist
date Wed, 28 Nov 2007 03:01:51 +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