Logging helper class.
More...
Logging helper class.
Definition at line 113 of file logging.h.
◆ Logger() [1/2]
Logging::Logger::Logger |
( |
LOGLEVEL |
loglevel, |
|
|
const std::string & |
filename |
|
) |
| |
|
inline |
Construct Logger object.
- Parameters
-
[in] | loglevel | - The maximum level of log output to write. |
[in] | filename | - Name of file for which this log entry was written. May be empty. |
Definition at line 121 of file logging.h.
◆ Logger() [2/2]
Logging::Logger::Logger |
( |
| ) |
|
|
inlineexplicit |
◆ ~Logger()
Logging::Logger::~Logger |
( |
| ) |
|
|
virtual |
Destroy Logger object.
Definition at line 109 of file logging.cc.
References COLOUR_DARK_GRAY, COLOUR_LIGHT_PURPLE, COLOUR_LIGHT_RED, COLOUR_RESET, LOGERROR, FFMPEGFS_PARAMS::m_basepath, m_filename, m_level_name_map, Logging::m_logging, m_loglevel, FFMPEGFS_PARAMS::m_mountpath, Logging::m_mutex, m_syslog_level_map, params, replace_start(), strsprintf(), transcoder_cache_path(), and trim().
◆ m_filename
const std::string Logging::Logger::m_filename |
|
private |
Name of file for which this log entry was written. May be empty.
Definition at line 137 of file logging.h.
Referenced by ~Logger().
◆ m_level_colour_map
Initial value:=
{
}
#define COLOUR_GREEN
ANSI ESC for green foreground.
#define COLOUR_RED
ANSI ESC for red foreground.
#define COLOUR_WHITE
ANSI ESC for white foreground.
#define COLOUR_YELLOW
ANSI ESC for yellow foreground.
#define COLOUR_BLUE
ANSI ESC for blue foreground.
constexpr Logging::LOGLEVEL LOGDEBUG
Shorthand for log level DEBUG.
constexpr Logging::LOGLEVEL LOGTRACE
Shorthand for log level TRACE.
constexpr Logging::LOGLEVEL LOGWARN
Shorthand for log level WARNING.
constexpr Logging::LOGLEVEL LOGERROR
Shorthand for log level ERROR.
constexpr Logging::LOGLEVEL LOGINFO
Shorthand for log level INFO.
Map log level enums to colours (logging to stderr only)
Definition at line 141 of file logging.h.
◆ m_level_name_map
Initial value:
Map log level enums to strings.
Definition at line 140 of file logging.h.
Referenced by ~Logger().
◆ m_loglevel
const LOGLEVEL Logging::Logger::m_loglevel |
|
private |
Log level required to write log entry.
Definition at line 135 of file logging.h.
Referenced by ~Logger().
◆ m_syslog_level_map
Initial value:
Map our log levels to syslog levels.
Definition at line 139 of file logging.h.
Referenced by ~Logger().
The documentation for this class was generated from the following files: