Home
Base module

ConsoleChannel

Log channel that writes formatted messages to standard output.

ConsoleChannel

#include <icy/logger.h>
class ConsoleChannel

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

Inherits: LogChannel

Log channel that writes formatted messages to standard output.

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
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:420

Parameters

  • name Unique channel name.

  • level Minimum severity level; messages below this level are dropped.

  • timeFormat strftime-compatible format string for timestamps.


write

virtual override

virtual void write(const LogStream & stream) override

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

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

Parameters

  • stream The log stream to write.
Reimplements