mousetrap v0.2.0
|
uninstantiatable singleton, provides global logging functionality More...
#include <log.hpp>
Public Member Functions | |
log ()=delete | |
ctor deleted, singleton instance that cannot be instantiated | |
Static Public Member Functions | |
static void | initialize () |
initiailze the logging suite, automatically called during construction of mousetrap::Application | |
static void | debug (const std::string &message, LogDomain=USER_DOMAIN) |
print a debug message, not printed unless set_surpress_debug is set to false | |
static void | info (const std::string &message, LogDomain=USER_DOMAIN) |
print a info message, usually reserved to benign logging, printed unless set_surpress_info is set to true | |
static void | warning (const std::string &message, LogDomain=USER_DOMAIN) |
print a warning message, appropriate to inform user of unexpected behavior that cannot cause an error | |
static void | critical (const std::string &message, LogDomain=USER_DOMAIN) |
inform user of an error, this function does not interrupt runtime | |
static void | fatal (const std::string &message, LogDomain=USER_DOMAIN) |
inform user of a critical error, this function will exit runtime | |
static void | set_surpress_debug (LogDomain, bool) |
surpress debug level log message for given log domain. true by default | |
static void | set_surpress_info (LogDomain, bool) |
surpress info level log message for given log domain. true by default | |
static bool | get_surpress_debug (LogDomain) |
get whether debug level log messages are printed for given domain | |
static bool | get_surpress_info (LogDomain) |
get whether info level log messages are printed for given domain | |
static bool | set_file (const std::string &path) |
specify a log file, any message regardless of priority will be appended to it. File will not be overwritten, if it does not exist, it will be created | |
template<typename Function_t > | |
static void | set_file_formatting_function (Function_t function) |
set formatting function, this functino transforms the log message into a string which will be appended to the log file. This function is not applied to messages printed to cout or cerr | |
static void | reset_file_formatting_function () |
reset formatting function to default | |
uninstantiatable singleton, provides global logging functionality
|
static |
inform user of an error, this function does not interrupt runtime
message | message |
domain | logging domain, optional |
Referenced by mousetrap::Stack::add_child(), mousetrap::Action::add_shortcut(), mousetrap::MenuModel::add_submenu(), mousetrap::Application::Application(), mousetrap::Shape::as_circle(), mousetrap::Shape::as_ellipse(), mousetrap::Shape::as_outline(), mousetrap::AspectFrame::AspectFrame(), mousetrap::MultisampledRenderTexture::bind_as_render_target(), mousetrap::file_system::copy(), mousetrap::file_system::create_file_at(), mousetrap::Image::create_from_file(), mousetrap::ImageDisplay::create_from_file(), mousetrap::KeyFile::create_from_file(), mousetrap::Icon::create_from_file(), mousetrap::Shader::create_from_file(), mousetrap::KeyFile::create_from_string(), mousetrap::Icon::create_from_theme(), mousetrap::FileDescriptor::create_monitor(), mousetrap::file_system::delete_at(), mousetrap::Application::get_action(), mousetrap::Stack::get_child_at(), mousetrap::FileDescriptor::get_children(), mousetrap::ColumnView::get_column_at(), mousetrap::ColumnView::get_column_with_title(), mousetrap::KeyFile::get_comment_above_group(), mousetrap::KeyFile::get_comment_above_key(), mousetrap::KeyFile::get_keys(), mousetrap::Image::get_pixel(), mousetrap::PopoverButton::get_relative_position(), mousetrap::StyleManager::get_style_class(), mousetrap::RenderTask::get_uniform_float(), mousetrap::RenderTask::get_uniform_hsva(), mousetrap::RenderTask::get_uniform_int(), mousetrap::RenderTask::get_uniform_rgba(), mousetrap::RenderTask::get_uniform_transform(), mousetrap::RenderTask::get_uniform_uint(), mousetrap::RenderTask::get_uniform_vec2(), mousetrap::RenderTask::get_uniform_vec3(), mousetrap::RenderTask::get_uniform_vec4(), mousetrap::KeyFile::get_value(), mousetrap::Shape::get_vertex_color(), mousetrap::Shape::get_vertex_position(), mousetrap::KeyFile::has_key(), mousetrap::ListView::insert(), mousetrap::Notebook::insert(), mousetrap::file_system::move(), mousetrap::Notebook::move_page_to(), mousetrap::file_system::move_to_trash(), mousetrap::KeyFile::operator std::string(), mousetrap::Popover::popup(), mousetrap::FileChooser::present(), mousetrap::Notebook::push_back(), mousetrap::ListView::push_back(), mousetrap::Notebook::push_front(), mousetrap::ListView::push_front(), mousetrap::FileDescriptor::query_info(), mousetrap::FileDescriptor::read_symlink(), mousetrap::Stack::remove_child(), mousetrap::KeyFile::save_to_file(), mousetrap::Image::save_to_file(), mousetrap::FlowBox::set_column_spacing(), mousetrap::KeyFile::set_comment_above_group(), mousetrap::KeyFile::set_comment_above_key(), mousetrap::Application::set_current_theme(), mousetrap::ProgressBar::set_fraction(), mousetrap::Image::set_pixel(), mousetrap::AspectFrame::set_ratio(), mousetrap::PopoverButton::set_relative_position(), mousetrap::FlowBox::set_row_spacing(), mousetrap::DropDown::set_selected(), mousetrap::SignalEmitter::set_signal_blocked(), mousetrap::Box::set_spacing(), mousetrap::Shape::set_vertex_color(), mousetrap::Shape::set_vertex_position(), mousetrap::Shape::set_vertex_texture_coordinate(), mousetrap::ColumnView::set_widget_at(), and mousetrap::ListView::set_widget_at().
|
static |
print a debug message, not printed unless set_surpress_debug is set to false
message | message |
domain | logging domain, optional |
|
static |
inform user of a critical error, this function will exit runtime
message | message |
domain | logging domain, optional |
|
static |
get whether debug level log messages are printed for given domain
domain | logging domain |
|
static |
get whether info level log messages are printed for given domain
domain | logging domain |
|
static |
print a info message, usually reserved to benign logging, printed unless set_surpress_info is set to true
message | message |
domain | logging domain, optional |
|
static |
initiailze the logging suite, automatically called during construction of mousetrap::Application
References reset_file_formatting_function().
|
static |
specify a log file, any message regardless of priority will be appended to it. File will not be overwritten, if it does not exist, it will be created
path | absolute path |
set_log_file
in the Julia Binding
|
static |
set formatting function, this functino transforms the log message into a string which will be appended to the log file. This function is not applied to messages printed to cout or cerr
Function_t | lambda with signatures (const std::string& message, const std::map<std::string, std::string>& fields) -> std::string |
function |
|
static |
surpress debug level log message for given log domain. true by default
domain | logging domain |
b | true if debug messages should be surpressed, false otherwise |
|
static |
surpress info level log message for given log domain. true by default
domain | logging domain |
b | true if info messages should be surpressed, false otherwise |
|
static |
print a warning message, appropriate to inform user of unexpected behavior that cannot cause an error
message | message |
domain | logging domain, optional |
Referenced by mousetrap::Application::add_action(), mousetrap::FileFilter::add_allowed_suffix(), mousetrap::Adjustment::Adjustment(), mousetrap::AspectFrame::AspectFrame(), mousetrap::StylusEventController::get_axis_value(), mousetrap::Action::get_state(), mousetrap::Application::release(), mousetrap::SpinButton::set_acceleration_rate(), mousetrap::SelectionModel::set_allow_no_selection_if_single(), mousetrap::AspectFrame::set_child_x_alignment(), mousetrap::AspectFrame::set_child_y_alignment(), mousetrap::Application::set_current_theme(), mousetrap::FileChooser::set_file_chooser_action(), mousetrap::Widget::set_listens_for_shortcut_actions(), mousetrap::Adjustment::set_lower(), mousetrap::GridView::set_max_n_columns(), mousetrap::GridView::set_min_n_columns(), mousetrap::Action::set_state(), mousetrap::Adjustment::set_step_increment(), mousetrap::Adjustment::set_upper(), and mousetrap::Application::unmark_as_busy().