Clarisse 5.0 SP8 SDK
5.0.5.8.0
|
Public Member Functions | |
CoreLogStreamer (CoreLogCtx &context) | |
void | append (int level, const CoreString &msg) |
void | print_log (int level, const CoreString &str) |
void | flush (int level) |
unsigned int | get_capacity (void) const |
void | set_capacity (unsigned int capacity) |
![]() | |
bool | is_kindof (const CoreBaseObject &object) const |
virtual size_t | get_memory_size () const |
CoreString | get_class_info_name () const |
const unsigned long & | get_class_info_id () const |
virtual bool | is_kindof (const CoreClassInfo &cinfo) const |
virtual const CoreClassInfo & | get_class_info () const |
template<class T > | |
T * | cast () |
template<class T > | |
const T * | cast () const |
![]() | |
bool | is_kindof (const CoreClassInfo &cinfo) const |
Protected Attributes | |
CoreLogCtx & | m_context |
log context | |
CoreString | m_messages [CoreLogLevel::LOG_LEVEL_COUNT] |
current messages | |
unsigned int | m_capacity |
the max number of characters per log messages before they are actually logged | |
Additional Inherited Members | |
![]() | |
static const CoreClassInfo & | class_info () |
template<class T > | |
static T * | cast (CoreBaseObject *object) |
template<class T > | |
static const T * | cast (const CoreBaseObject *object) |
This class stacks messages until a given capacity is reached, at which point it will dispatch the message to the CoreLogCtx instance.
CoreLogStreamer::CoreLogStreamer | ( | CoreLogCtx & | context | ) |
Constructor. Will initialize the capacity to 80 because it's the default max column char count on Unix systems.
|
inline |
Append a message to a log level
|
inline |
Flush the given level (will call print_log on it)
|
inline |
Get the current capacity
|
inline |
Print a log message at the given level. Will forward the log to the log context.
void CoreLogStreamer::set_capacity | ( | unsigned int | capacity | ) |
Set the max capacity for all log levels. If a level overflow the new capacity, it will be flushed.