#include <logger.hpp>
Creates a new logger instance that can be used to spit out messages using a stream interface.
Loggers can either be manually instantiated or derived from.
The context identifies the module that this logger instance represents, ie: GameManager, db_adapter, UIEngine, etc.
Message will be prefixed with [A]
Message will be prefixed with [C]
void kzh::logger::deindent |
( |
| ) |
|
|
static |
void kzh::logger::enable_timestamps |
( |
bool |
on_or_off | ) |
|
|
static |
Messages will be prefixed with a timestamp of the following format: => dd-mm-yyyy hh:mm::ss
Message will be prefixed with [E]
Referenced by kzh::patcher::apply_update(), kzh::file_manager::create_directory(), kzh::delete_operation::deploy(), kzh::update_operation::deploy(), kzh::create_operation::deploy(), kzh::downloader::fetch(), kzh::md5_hasher::hex_digest(), kzh::file_manager::is_readable(), kzh::locate_bin_directory(), kzh::file_manager::make_executable(), kzh::on_curl_data(), kzh::delete_operation::rollback(), kzh::delete_operation::stage(), kzh::update_operation::stage(), and kzh::create_operation::stage().
void kzh::logger::indent |
( |
| ) |
|
|
static |
void kzh::logger::mute |
( |
| ) |
|
|
static |
void kzh::logger::rename_context |
( |
string_t const & |
new_ctx | ) |
|
|
protected |
void kzh::logger::set_app_name |
( |
string_t const & |
app_name | ) |
|
|
static |
All messages will be prefixed by the specified application name
void kzh::logger::set_stream |
( |
std::ostream * |
s | ) |
|
|
static |
Override the stream to append the messages to (defaults to std::cout)
void kzh::logger::set_threshold |
( |
char |
level | ) |
|
|
static |
Assigns the threshold to use for filtering messages. Messages logged with a level "below" the assigned threshold will not be logged.
Available level thresholds (ordered): => D, I, N, W, E, A, C
void kzh::logger::set_uuid_prefix |
( |
string_t const & |
uuid | ) |
|
Subsequent messages will be prefixed with {IN_UUID} positioned right after the [LEVEL] part.
void kzh::logger::unmute |
( |
| ) |
|
|
static |
string_t const & kzh::logger::uuid_prefix |
( |
| ) |
const |
The assigned UUID prefix, if any
The documentation for this class was generated from the following files: