Class Logger

Class Documentation

class Logger

A simple wrapper class using spdmon to provide log output streams. Implemented as a singleton to produce consistent log output.

Public Functions

Logger(Logger const&) = delete

Delete for singleton pattern.

void operator=(Logger const&) = delete

Delete for singleton pattern.

void print()

Prints buffer.

void flush()

Flushes the internal buffer.

template<typename T>
inline void append(const T &token)

Appends the serialized (textual) object to the internal buffer. Works for all types that support ostream serialization (i.e., an <<-Operator)

Parameters:

token – Token to add to the internal buffer

inline void setLogLevel(const LogLevel &level)

Sets the current log level. All messages until the next call or inserted format token will be logged at the set log level.

Parameters:

level – The new log level

Public Static Functions

static inline Logger &get()

Returns the logger instance.