Cinder  0.9.1
Classes | Namespaces | Macros | Typedefs | Enumerations | Functions
Log.h File Reference
#include "cinder/Cinder.h"
#include "cinder/Filesystem.h"
#include "cinder/CurrentFunction.h"
#include "cinder/CinderAssert.h"
#include "cinder/Noncopyable.h"
#include "cinder/System.h"
#include <sstream>
#include <fstream>
#include <vector>
#include <memory>
#include <mutex>

Classes

struct  cinder::log::Location
 
struct  cinder::log::Metadata
 
class  cinder::log::Logger
 
class  cinder::log::LoggerConsole
 
class  cinder::log::LoggerFile
 
class  cinder::log::LoggerFileRotating
 
class  cinder::log::LoggerBreakpoint
 
class  cinder::log::LoggerSystem
 
class  cinder::log::LogManager
 
struct  cinder::log::Entry
 

Namespaces

 cinder
 
 cinder::log
 

Macros

#define CINDER_LOG_STREAM(level, stream)   ::cinder::log::Entry( level, ::cinder::log::Location( CINDER_CURRENT_FUNCTION, __FILE__, __LINE__ ) ) << stream
 
#define CI_MIN_LOG_LEVEL   0
 
#define CI_LOG_V(stream)   CINDER_LOG_STREAM( ::cinder::log::LEVEL_VERBOSE, stream )
 
#define CI_LOG_D(stream)   CINDER_LOG_STREAM( ::cinder::log::LEVEL_DEBUG, stream )
 
#define CI_LOG_I(stream)   CINDER_LOG_STREAM( ::cinder::log::LEVEL_INFO, stream )
 
#define CI_LOG_W(stream)   CINDER_LOG_STREAM( ::cinder::log::LEVEL_WARNING, stream )
 
#define CI_LOG_E(stream)   CINDER_LOG_STREAM( ::cinder::log::LEVEL_ERROR, stream )
 
#define CI_LOG_F(stream)   CINDER_LOG_STREAM( ::cinder::log::LEVEL_FATAL, stream )
 
#define CI_LOG_EXCEPTION(str, exc)
 

Typedefs

typedef std::shared_ptr< Logger > cinder::log::LoggerRef
 

Enumerations

enum  cinder::log::Level {
  cinder::log::LEVEL_VERBOSE, cinder::log::LEVEL_DEBUG, cinder::log::LEVEL_INFO, cinder::log::LEVEL_WARNING,
  cinder::log::LEVEL_ERROR, cinder::log::LEVEL_FATAL
}
 

Functions

std::ostream & cinder::log::operator<< (std::ostream &os, const Location &rhs)
 
std::ostream & cinder::log::operator<< (std::ostream &lhs, const Level &rhs)
 
LogManager * cinder::log::manager ()
 
template<typename LoggerT , typename... Args>
std::shared_ptr< LoggerT > cinder::log::makeLogger (Args &&...args)
 
template<typename LoggerT , typename... Args>
std::shared_ptr< LoggerT > cinder::log::makeOrGetLogger (Args &&...args)
 

Macro Definition Documentation

#define CINDER_LOG_STREAM (   level,
  stream 
)    ::cinder::log::Entry( level, ::cinder::log::Location( CINDER_CURRENT_FUNCTION, __FILE__, __LINE__ ) ) << stream
#define CI_MIN_LOG_LEVEL   0
#define CI_LOG_V (   stream)    CINDER_LOG_STREAM( ::cinder::log::LEVEL_VERBOSE, stream )
#define CI_LOG_D (   stream)    CINDER_LOG_STREAM( ::cinder::log::LEVEL_DEBUG, stream )
#define CI_LOG_I (   stream)    CINDER_LOG_STREAM( ::cinder::log::LEVEL_INFO, stream )
#define CI_LOG_W (   stream)    CINDER_LOG_STREAM( ::cinder::log::LEVEL_WARNING, stream )
#define CI_LOG_E (   stream)    CINDER_LOG_STREAM( ::cinder::log::LEVEL_ERROR, stream )
#define CI_LOG_F (   stream)    CINDER_LOG_STREAM( ::cinder::log::LEVEL_FATAL, stream )
#define CI_LOG_EXCEPTION (   str,
  exc 
)
Value:
{ \
CI_LOG_E( str << ", exception type: " << cinder::System::demangleTypeName( typeid( exc ).name() ) << ", what: " << exc.what() ); \
}
#define CI_LOG_E(stream)
Definition: Log.h:364
static std::string demangleTypeName(const char *mangledName)
Returns the result of.
Definition: System.cpp:618

Debug macro to simplify logging an exception, which also prints the exception type.