Base module

ConsoleChannel

Log channel that writes formatted messages to standard output.

#include <icy/logger.h>

class ConsoleChannel

Defined in src/base/include/icy/logger.h:456

Inherits
LogChannel

List of all members

NameKindOwner
ConsoleChannelfunctionDeclared here
~ConsoleChannelfunctionDeclared here
writefunctionDeclared here
LogChannelfunctionInherited from LogChannel
~LogChannelfunctionInherited from LogChannel
writefunctionInherited from LogChannel
writefunctionInherited from LogChannel
formatfunctionInherited from LogChannel
namefunctionInherited from LogChannel
levelfunctionInherited from LogChannel
timeFormatfunctionInherited from LogChannel
setLevelfunctionInherited from LogChannel
setTimeFormatfunctionInherited from LogChannel
setFilterfunctionInherited from LogChannel
_namevariableInherited from LogChannel
_levelvariableInherited from LogChannel
_timeFormatvariableInherited from LogChannel
_filtervariableInherited from LogChannel

Inherited from LogChannel

KindNameDescription
functionLogChannel
function~LogChannel virtualDefaulted destructor.
functionwrite virtualWrites a log stream entry to this channel.
functionwrite virtualWrites a plain message to this channel.
functionformat virtualFormats a log stream entry into the given output stream.
functionname const inlineReturns the channel name.
functionlevel const inlineReturns the minimum severity level.
functiontimeFormat const inlineReturns the timestamp format string.
functionsetLevel inlineSets the minimum severity level.
functionsetTimeFormat inlineSets the timestamp format string.
functionsetFilter inlineSets a realm filter; only messages whose realm matches are written.
variable_name
variable_level
variable_timeFormat
variable_filter

Public Methods

ReturnNameDescription
ConsoleChannel
~ConsoleChannel virtualDefaulted destructor.
voidwrite virtual overrideFormats and writes the log stream entry to stdout. Messages below the channel level or filtered by realm are silently dropped.

ConsoleChannel

ConsoleChannel(std::string name, Level level = Level::Debug, std::string timeFormat = "%H:%M:%S")

Defined in src/base/include/icy/logger.h:462

Parameters

ParameterTypeDescription
namestd::stringUnique channel name.
levelLevelMinimum severity level; messages below this level are dropped.
timeFormatstd::stringstrftime-compatible format string for timestamps.

~ConsoleChannel

virtual

virtual ~ConsoleChannel() = default

Defined in src/base/include/icy/logger.h:464

Defaulted destructor.


write

virtual override

virtual void write(const LogStream & stream) override

Defined in src/base/include/icy/logger.h:469

Formats and writes the log stream entry to stdout. Messages below the channel level or filtered by realm are silently dropped.

Reimplements

Parameters

ParameterTypeDescription
streamconst LogStream &The log stream to write.