|
pianod2
multisource multiuser scriptable networked music player
|
Debug/event logging interface. More...
#include <config.h>#include <cstring>#include <cstdarg>#include <iostream>#include <utility>

Go to the source code of this file.
Macros | |
| #define | LOG_WHERE(level) (level), trim_filename(__FILE__), ":", __LINE__, " ", __func__, " (", #level, "): " |
| #define | LOG_FUNCTION(level) (level), trim_filename(__FILE__), ":", __LINE__, " ", __func__, " (", #level, "): " |
Typedefs | |
| using | Log = LogType |
Enumerations | |
| enum class | LogType { ERROR = 0 , LOG_000 = 0x01 , LOG_100 = 0x02 , LOG_200 = 0x04 , LOG_300 = 0x08 , LOG_400 = 0x10 , LOG_500 = 0x20 , GENERAL = 0x80 , WARNING = 0x200 , QUEUE = 0x400 , USERACTION = 0x1000 , PROTOCOL = 0x2000 , ALLOCATIONS = 0x4000 , CACHES = 0x8000 , TUNING = 0x10000 , BIASING = 0x20000 , METADATA = 0x40000 , AUDIO = 0x80000 , PANDORA = 0x100000 , FILESYSTEM = 0x2000000 } |
Functions | |
| void | set_logging (LogType logtype) |
| Set the logging selections. More... | |
| LogType | get_logging () |
| void | flog_timestamp () |
| Logging helper subroutine to format and emit the time. More... | |
| constexpr LogType | operator| (const LogType a, const LogType b) |
| Allow LogType values to be OR'ed together. More... | |
| constexpr LogType | operator& (const LogType a, const LogType b) |
| Allow LogType values to be AND'ed apart. More... | |
| constexpr LogType | operator^ (const LogType a, const LogType b) |
| Allow LogType values to be toggled. More... | |
| constexpr LogType | operator- (const LogType a, const LogType b) |
| Allow LogType values to have bits removed.. More... | |
| static const char * | trim_filename (const char *path) |
| void | flog_details (void) |
| Implement empty argument list for flogging. More... | |
| bool | logging_enabled (LogType level) |
| template<typename OutputItem , typename... MoreItems> | |
| void | flog_details (OutputItem message, MoreItems &&... more) |
| Recurse while there are arguments for flogging. More... | |
| template<typename... MoreItems> | |
| void | flog (LogType level, MoreItems &&... more) |
| Log messages when their logging category is enabled. More... | |
Variables | |
| LogType | flogging_level |
| bool | flog_include_timestamp |
Debug/event logging interface.
| #define LOG_FUNCTION | ( | level | ) | (level), trim_filename(__FILE__), ":", __LINE__, " ", __func__, " (", #level, "): " |
| #define LOG_WHERE | ( | level | ) | (level), trim_filename(__FILE__), ":", __LINE__, " ", __func__, " (", #level, "): " |
|
strong |
| void flog | ( | LogType | level, |
| MoreItems &&... | more | ||
| ) |
Log messages when their logging category is enabled.
Errors are always logged. Message to to standard out.

| void flog_details | ( | OutputItem | message, |
| MoreItems &&... | more | ||
| ) |
Recurse while there are arguments for flogging.

|
inline |
Implement empty argument list for flogging.

| void flog_timestamp | ( | ) |
Logging helper subroutine to format and emit the time.

| LogType get_logging | ( | ) |

|
inline |

Allow LogType values to be AND'ed apart.
Allow LogType values to have bits removed..
Allow LogType values to be toggled.
Allow LogType values to be OR'ed together.
| void set_logging | ( | LogType | logtype | ) |
Set the logging selections.
| logtype | A bitfield indicating what events to log. |

|
inlinestatic |
|
extern |
|
extern |