#include <icy/logger.h>Inherits:
LogChannel
Log channel that writes formatted messages to a file.
| Return | Name | Description |
|---|---|---|
FileChannel | #### Parameters | |
void | write virtual | Formats and writes the log stream entry to the file. Opens the file on first write if not already open. |
void | setPath | Sets the file path and reopens the file stream. |
std::string | path const | Returns the current log file path. |
FileChannel(std::string name, std::string path, Level level, std::string timeFormat)name Unique channel name.
path Path to the output log file. Directories are created if needed.
level Minimum severity level; messages below this level are dropped.
timeFormat strftime-compatible format string for timestamps.
virtual
virtual void write(const LogStream & stream)Formats and writes the log stream entry to the file. Opens the file on first write if not already open.
stream The log stream to write.void setPath(const std::string & path)Sets the file path and reopens the file stream.
path Path to the new log file.const
std::string path() constReturns the current log file path.
Absolute or relative path to the log file.
std::ofstream _fstreamstd::string _pathvirtual
virtual void open()virtual
virtual void close()