TurtleBrains  0.3.5
High quality, portable, C++ framework for rapid 2D game development.
TurtleBrains::Core::Debug::LogChannelLevel< ChannelNamer > Class Template Reference

#include <tb_debug_logger.hpp>

Classes

class  Setter
 

Static Public Member Functions

static void LogAlways (const char *formattedMessage,...)
 
static LogWithQuotes Quote (const String &message)
 
static LogLevel GetLogLevel (void)
 
static void SetLogLevel (const LogLevel &logLevel)
 
static String AsString (void)
 
static Setter Always (void)
 
static Setter Error (void)
 
static Setter Warning (void)
 
static Setter Info (void)
 
static Setter Debug (void)
 
static Setter Trace (void)
 

Detailed Description

template<typename ChannelNamer>
class TurtleBrains::Core::Debug::LogChannelLevel< ChannelNamer >

Usage case for channelNamer is: struct ChannelName { static std::string AsString(void) { return ("ChannelName"); } };

To create a channel type, do the following: struct PhysicsChannel { static std::string AsString(void) { return ("Physics"); } }; typedef Core::LogChannelLevel<PhysicsChannel> LogPhysics; To change to the channel / log level desired use the following: tb_debug_output(LogPhysics::Error() << "Physics Error Here.");