|
Electroneum
|

Go to the source code of this file.
Namespaces | |
| epee | |
| epee::debug | |
Macros | |
| #define | ELECTRONEUM_DEFAULT_LOG_CATEGORY "default" |
| #define | MAX_LOG_FILE_SIZE 104850000 |
| #define | MAX_LOG_FILES 50 |
| #define | MCLOG_TYPE(level, cat, type, x) |
| #define | MCLOG(level, cat, x) MCLOG_TYPE(level, cat, el::base::DispatchAction::NormalLog, x) |
| #define | MCLOG_FILE(level, cat, x) MCLOG_TYPE(level, cat, el::base::DispatchAction::FileOnlyLog, x) |
| #define | MCFATAL(cat, x) MCLOG(el::Level::Fatal,cat, x) |
| #define | MCERROR(cat, x) MCLOG(el::Level::Error,cat, x) |
| #define | MCWARNING(cat, x) MCLOG(el::Level::Warning,cat, x) |
| #define | MCINFO(cat, x) MCLOG(el::Level::Info,cat, x) |
| #define | MCDEBUG(cat, x) MCLOG(el::Level::Debug,cat, x) |
| #define | MCTRACE(cat, x) MCLOG(el::Level::Trace,cat, x) |
| #define | MCLOG_COLOR(level, cat, color, x) MCLOG(level,cat,"\033[1;" color "m" << x << "\033[0m") |
| #define | MCLOG_RED(level, cat, x) MCLOG_COLOR(level,cat,"31",x) |
| #define | MCLOG_GREEN(level, cat, x) MCLOG_COLOR(level,cat,"32",x) |
| #define | MCLOG_YELLOW(level, cat, x) MCLOG_COLOR(level,cat,"33",x) |
| #define | MCLOG_BLUE(level, cat, x) MCLOG_COLOR(level,cat,"34",x) |
| #define | MCLOG_MAGENTA(level, cat, x) MCLOG_COLOR(level,cat,"35",x) |
| #define | MCLOG_CYAN(level, cat, x) MCLOG_COLOR(level,cat,"36",x) |
| #define | MLOG_RED(level, x) MCLOG_RED(level,ELECTRONEUM_DEFAULT_LOG_CATEGORY,x) |
| #define | MLOG_GREEN(level, x) MCLOG_GREEN(level,ELECTRONEUM_DEFAULT_LOG_CATEGORY,x) |
| #define | MLOG_YELLOW(level, x) MCLOG_YELLOW(level,ELECTRONEUM_DEFAULT_LOG_CATEGORY,x) |
| #define | MLOG_BLUE(level, x) MCLOG_BLUE(level,ELECTRONEUM_DEFAULT_LOG_CATEGORY,x) |
| #define | MLOG_MAGENTA(level, x) MCLOG_MAGENTA(level,ELECTRONEUM_DEFAULT_LOG_CATEGORY,x) |
| #define | MLOG_CYAN(level, x) MCLOG_CYAN(level,ELECTRONEUM_DEFAULT_LOG_CATEGORY,x) |
| #define | MFATAL(x) MCFATAL(ELECTRONEUM_DEFAULT_LOG_CATEGORY,x) |
| #define | MERROR(x) MCERROR(ELECTRONEUM_DEFAULT_LOG_CATEGORY,x) |
| #define | MWARNING(x) MCWARNING(ELECTRONEUM_DEFAULT_LOG_CATEGORY,x) |
| #define | MINFO(x) MCINFO(ELECTRONEUM_DEFAULT_LOG_CATEGORY,x) |
| #define | MDEBUG(x) MCDEBUG(ELECTRONEUM_DEFAULT_LOG_CATEGORY,x) |
| #define | MTRACE(x) MCTRACE(ELECTRONEUM_DEFAULT_LOG_CATEGORY,x) |
| #define | MLOG(level, x) MCLOG(level,ELECTRONEUM_DEFAULT_LOG_CATEGORY,x) |
| #define | MGINFO(x) MCINFO("global",x) |
| #define | MGINFO_RED(x) MCLOG_RED(el::Level::Info, "global",x) |
| #define | MGINFO_GREEN(x) MCLOG_GREEN(el::Level::Info, "global",x) |
| #define | MGINFO_YELLOW(x) MCLOG_YELLOW(el::Level::Info, "global",x) |
| #define | MGINFO_BLUE(x) MCLOG_BLUE(el::Level::Info, "global",x) |
| #define | MGINFO_MAGENTA(x) MCLOG_MAGENTA(el::Level::Info, "global",x) |
| #define | MGINFO_CYAN(x) MCLOG_CYAN(el::Level::Info, "global",x) |
| #define | IFLOG(level, cat, type, init, x) |
| #define | MIDEBUG(init, x) IFLOG(el::Level::Debug, ELECTRONEUM_DEFAULT_LOG_CATEGORY, el::base::DispatchAction::NormalLog, init, x) |
| #define | LOG_ERROR(x) MERROR(x) |
| #define | LOG_PRINT_L0(x) MWARNING(x) |
| #define | LOG_PRINT_L1(x) MINFO(x) |
| #define | LOG_PRINT_L2(x) MDEBUG(x) |
| #define | LOG_PRINT_L3(x) MTRACE(x) |
| #define | LOG_PRINT_L4(x) MTRACE(x) |
| #define | _dbg3(x) MTRACE(x) |
| #define | _dbg2(x) MDEBUG(x) |
| #define | _dbg1(x) MDEBUG(x) |
| #define | _info(x) MINFO(x) |
| #define | _note(x) MDEBUG(x) |
| #define | _fact(x) MDEBUG(x) |
| #define | _mark(x) MDEBUG(x) |
| #define | _warn(x) MWARNING(x) |
| #define | _erro(x) MERROR(x) |
| #define | MLOG_SET_THREAD_NAME(x) el::Helpers::setThreadName(x) |
| #define | LOCAL_ASSERT(expr) |
| #define | ENDL std::endl |
| #define | TRY_ENTRY() try { |
| #define | CATCH_ENTRY(location, return_val) |
| #define | CATCH_ENTRY_L0(lacation, return_val) CATCH_ENTRY(lacation, return_val) |
| #define | CATCH_ENTRY_L1(lacation, return_val) CATCH_ENTRY(lacation, return_val) |
| #define | CATCH_ENTRY_L2(lacation, return_val) CATCH_ENTRY(lacation, return_val) |
| #define | CATCH_ENTRY_L3(lacation, return_val) CATCH_ENTRY(lacation, return_val) |
| #define | CATCH_ENTRY_L4(lacation, return_val) CATCH_ENTRY(lacation, return_val) |
| #define | ASSERT_MES_AND_THROW(message) {LOG_ERROR(message); std::stringstream ss; ss << message; throw std::runtime_error(ss.str());} |
| #define | CHECK_AND_ASSERT_THROW_MES(expr, message) do {if(!(expr)) ASSERT_MES_AND_THROW(message);} while(0) |
| #define | CHECK_AND_ASSERT(expr, fail_ret_val) do{if(!(expr)){LOCAL_ASSERT(expr); return fail_ret_val;};}while(0) |
| #define | CHECK_AND_ASSERT_MES(expr, fail_ret_val, message) do{if(!(expr)) {LOG_ERROR(message); return fail_ret_val;};}while(0) |
| #define | CHECK_AND_NO_ASSERT_MES_L(expr, fail_ret_val, l, message) do{if(!(expr)) {LOG_PRINT_L##l(message); /*LOCAL_ASSERT(expr);*/ return fail_ret_val;};}while(0) |
| #define | CHECK_AND_NO_ASSERT_MES(expr, fail_ret_val, message) CHECK_AND_NO_ASSERT_MES_L(expr, fail_ret_val, 0, message) |
| #define | CHECK_AND_NO_ASSERT_MES_L1(expr, fail_ret_val, message) CHECK_AND_NO_ASSERT_MES_L(expr, fail_ret_val, 1, message) |
| #define | CHECK_AND_ASSERT_MES_NO_RET(expr, message) do{if(!(expr)) {LOG_ERROR(message); return;};}while(0) |
| #define | CHECK_AND_ASSERT_MES2(expr, message) do{if(!(expr)) {LOG_ERROR(message); };}while(0) |
Functions | |
| std::string | mlog_get_default_log_path (const char *default_filename) |
| void | mlog_configure (const std::string &filename_base, bool console, const std::size_t max_log_file_size=MAX_LOG_FILE_SIZE, const std::size_t max_log_files=MAX_LOG_FILES) |
| void | mlog_set_categories (const char *categories) |
| std::string | mlog_get_categories () |
| void | mlog_set_log_level (int level) |
| void | mlog_set_log (const char *log) |
| bool | epee::debug::get_set_enable_assert (bool set=false, bool v=false) |
| bool | epee::is_stdout_a_tty () |
| void | epee::set_console_color (int color, bool bright) |
| void | epee::reset_console_color () |
| #define _dbg1 | ( | x | ) | MDEBUG(x) |
Definition at line 107 of file misc_log_ex.h.
| #define _dbg2 | ( | x | ) | MDEBUG(x) |
Definition at line 106 of file misc_log_ex.h.
| #define _dbg3 | ( | x | ) | MTRACE(x) |
Definition at line 105 of file misc_log_ex.h.
| #define _erro | ( | x | ) | MERROR(x) |
Definition at line 113 of file misc_log_ex.h.
| #define _fact | ( | x | ) | MDEBUG(x) |
Definition at line 110 of file misc_log_ex.h.
| #define _info | ( | x | ) | MINFO(x) |
Definition at line 108 of file misc_log_ex.h.
| #define _mark | ( | x | ) | MDEBUG(x) |
Definition at line 111 of file misc_log_ex.h.
| #define _note | ( | x | ) | MDEBUG(x) |
Definition at line 109 of file misc_log_ex.h.
| #define _warn | ( | x | ) | MWARNING(x) |
Definition at line 112 of file misc_log_ex.h.
| #define ASSERT_MES_AND_THROW | ( | message | ) | {LOG_ERROR(message); std::stringstream ss; ss << message; throw std::runtime_error(ss.str());} |
Definition at line 172 of file misc_log_ex.h.
| #define CATCH_ENTRY | ( | location, | |
| return_val | |||
| ) |
Definition at line 152 of file misc_log_ex.h.
| #define CATCH_ENTRY_L0 | ( | lacation, | |
| return_val | |||
| ) | CATCH_ENTRY(lacation, return_val) |
Definition at line 165 of file misc_log_ex.h.
| #define CATCH_ENTRY_L1 | ( | lacation, | |
| return_val | |||
| ) | CATCH_ENTRY(lacation, return_val) |
Definition at line 166 of file misc_log_ex.h.
| #define CATCH_ENTRY_L2 | ( | lacation, | |
| return_val | |||
| ) | CATCH_ENTRY(lacation, return_val) |
Definition at line 167 of file misc_log_ex.h.
| #define CATCH_ENTRY_L3 | ( | lacation, | |
| return_val | |||
| ) | CATCH_ENTRY(lacation, return_val) |
Definition at line 168 of file misc_log_ex.h.
| #define CATCH_ENTRY_L4 | ( | lacation, | |
| return_val | |||
| ) | CATCH_ENTRY(lacation, return_val) |
Definition at line 169 of file misc_log_ex.h.
| #define CHECK_AND_ASSERT | ( | expr, | |
| fail_ret_val | |||
| ) | do{if(!(expr)){LOCAL_ASSERT(expr); return fail_ret_val;};}while(0) |
Definition at line 177 of file misc_log_ex.h.
| #define CHECK_AND_ASSERT_MES | ( | expr, | |
| fail_ret_val, | |||
| message | |||
| ) | do{if(!(expr)) {LOG_ERROR(message); return fail_ret_val;};}while(0) |
Definition at line 181 of file misc_log_ex.h.
Definition at line 203 of file misc_log_ex.h.
| #define CHECK_AND_ASSERT_MES_NO_RET | ( | expr, | |
| message | |||
| ) | do{if(!(expr)) {LOG_ERROR(message); return;};}while(0) |
Definition at line 198 of file misc_log_ex.h.
| #define CHECK_AND_ASSERT_THROW_MES | ( | expr, | |
| message | |||
| ) | do {if(!(expr)) ASSERT_MES_AND_THROW(message);} while(0) |
Definition at line 173 of file misc_log_ex.h.
| #define CHECK_AND_NO_ASSERT_MES | ( | expr, | |
| fail_ret_val, | |||
| message | |||
| ) | CHECK_AND_NO_ASSERT_MES_L(expr, fail_ret_val, 0, message) |
Definition at line 189 of file misc_log_ex.h.
| #define CHECK_AND_NO_ASSERT_MES_L | ( | expr, | |
| fail_ret_val, | |||
| l, | |||
| message | |||
| ) | do{if(!(expr)) {LOG_PRINT_L##l(message); /*LOCAL_ASSERT(expr);*/ return fail_ret_val;};}while(0) |
Definition at line 185 of file misc_log_ex.h.
| #define CHECK_AND_NO_ASSERT_MES_L1 | ( | expr, | |
| fail_ret_val, | |||
| message | |||
| ) | CHECK_AND_NO_ASSERT_MES_L(expr, fail_ret_val, 1, message) |
Definition at line 193 of file misc_log_ex.h.
| #define ELECTRONEUM_DEFAULT_LOG_CATEGORY "default" |
Definition at line 36 of file misc_log_ex.h.
| #define ENDL std::endl |
Definition at line 149 of file misc_log_ex.h.
| #define IFLOG | ( | level, | |
| cat, | |||
| type, | |||
| init, | |||
| x | |||
| ) |
Definition at line 88 of file misc_log_ex.h.
| #define LOCAL_ASSERT | ( | expr | ) |
Definition at line 122 of file misc_log_ex.h.
| #define LOG_ERROR | ( | x | ) | MERROR(x) |
Definition at line 98 of file misc_log_ex.h.
| #define LOG_PRINT_L0 | ( | x | ) | MWARNING(x) |
Definition at line 99 of file misc_log_ex.h.
| #define LOG_PRINT_L1 | ( | x | ) | MINFO(x) |
Definition at line 100 of file misc_log_ex.h.
| #define LOG_PRINT_L2 | ( | x | ) | MDEBUG(x) |
Definition at line 101 of file misc_log_ex.h.
| #define LOG_PRINT_L3 | ( | x | ) | MTRACE(x) |
Definition at line 102 of file misc_log_ex.h.
| #define LOG_PRINT_L4 | ( | x | ) | MTRACE(x) |
Definition at line 103 of file misc_log_ex.h.
| #define MAX_LOG_FILE_SIZE 104850000 |
Definition at line 38 of file misc_log_ex.h.
| #define MAX_LOG_FILES 50 |
Definition at line 39 of file misc_log_ex.h.
| #define MCDEBUG | ( | cat, | |
| x | |||
| ) | MCLOG(el::Level::Debug,cat, x) |
Definition at line 54 of file misc_log_ex.h.
| #define MCERROR | ( | cat, | |
| x | |||
| ) | MCLOG(el::Level::Error,cat, x) |
Definition at line 51 of file misc_log_ex.h.
| #define MCFATAL | ( | cat, | |
| x | |||
| ) | MCLOG(el::Level::Fatal,cat, x) |
Definition at line 50 of file misc_log_ex.h.
| #define MCINFO | ( | cat, | |
| x | |||
| ) | MCLOG(el::Level::Info,cat, x) |
Definition at line 53 of file misc_log_ex.h.
| #define MCLOG | ( | level, | |
| cat, | |||
| x | |||
| ) | MCLOG_TYPE(level, cat, el::base::DispatchAction::NormalLog, x) |
Definition at line 47 of file misc_log_ex.h.
| #define MCLOG_BLUE | ( | level, | |
| cat, | |||
| x | |||
| ) | MCLOG_COLOR(level,cat,"34",x) |
Definition at line 61 of file misc_log_ex.h.
| #define MCLOG_COLOR | ( | level, | |
| cat, | |||
| color, | |||
| x | |||
| ) | MCLOG(level,cat,"\033[1;" color "m" << x << "\033[0m") |
Definition at line 57 of file misc_log_ex.h.
| #define MCLOG_CYAN | ( | level, | |
| cat, | |||
| x | |||
| ) | MCLOG_COLOR(level,cat,"36",x) |
Definition at line 63 of file misc_log_ex.h.
| #define MCLOG_FILE | ( | level, | |
| cat, | |||
| x | |||
| ) | MCLOG_TYPE(level, cat, el::base::DispatchAction::FileOnlyLog, x) |
Definition at line 48 of file misc_log_ex.h.
| #define MCLOG_GREEN | ( | level, | |
| cat, | |||
| x | |||
| ) | MCLOG_COLOR(level,cat,"32",x) |
Definition at line 59 of file misc_log_ex.h.
| #define MCLOG_MAGENTA | ( | level, | |
| cat, | |||
| x | |||
| ) | MCLOG_COLOR(level,cat,"35",x) |
Definition at line 62 of file misc_log_ex.h.
| #define MCLOG_RED | ( | level, | |
| cat, | |||
| x | |||
| ) | MCLOG_COLOR(level,cat,"31",x) |
Definition at line 58 of file misc_log_ex.h.
| #define MCLOG_TYPE | ( | level, | |
| cat, | |||
| type, | |||
| x | |||
| ) |
Definition at line 41 of file misc_log_ex.h.
| #define MCLOG_YELLOW | ( | level, | |
| cat, | |||
| x | |||
| ) | MCLOG_COLOR(level,cat,"33",x) |
Definition at line 60 of file misc_log_ex.h.
| #define MCTRACE | ( | cat, | |
| x | |||
| ) | MCLOG(el::Level::Trace,cat, x) |
Definition at line 55 of file misc_log_ex.h.
| #define MCWARNING | ( | cat, | |
| x | |||
| ) | MCLOG(el::Level::Warning,cat, x) |
Definition at line 52 of file misc_log_ex.h.
| #define MDEBUG | ( | x | ) | MCDEBUG(ELECTRONEUM_DEFAULT_LOG_CATEGORY,x) |
Definition at line 76 of file misc_log_ex.h.
| #define MERROR | ( | x | ) | MCERROR(ELECTRONEUM_DEFAULT_LOG_CATEGORY,x) |
Definition at line 73 of file misc_log_ex.h.
| #define MFATAL | ( | x | ) | MCFATAL(ELECTRONEUM_DEFAULT_LOG_CATEGORY,x) |
Definition at line 72 of file misc_log_ex.h.
| #define MGINFO | ( | x | ) | MCINFO("global",x) |
Definition at line 80 of file misc_log_ex.h.
| #define MGINFO_BLUE | ( | x | ) | MCLOG_BLUE(el::Level::Info, "global",x) |
Definition at line 84 of file misc_log_ex.h.
| #define MGINFO_CYAN | ( | x | ) | MCLOG_CYAN(el::Level::Info, "global",x) |
Definition at line 86 of file misc_log_ex.h.
| #define MGINFO_GREEN | ( | x | ) | MCLOG_GREEN(el::Level::Info, "global",x) |
Definition at line 82 of file misc_log_ex.h.
| #define MGINFO_MAGENTA | ( | x | ) | MCLOG_MAGENTA(el::Level::Info, "global",x) |
Definition at line 85 of file misc_log_ex.h.
| #define MGINFO_RED | ( | x | ) | MCLOG_RED(el::Level::Info, "global",x) |
Definition at line 81 of file misc_log_ex.h.
| #define MGINFO_YELLOW | ( | x | ) | MCLOG_YELLOW(el::Level::Info, "global",x) |
Definition at line 83 of file misc_log_ex.h.
| #define MIDEBUG | ( | init, | |
| x | |||
| ) | IFLOG(el::Level::Debug, ELECTRONEUM_DEFAULT_LOG_CATEGORY, el::base::DispatchAction::NormalLog, init, x) |
Definition at line 95 of file misc_log_ex.h.
| #define MINFO | ( | x | ) | MCINFO(ELECTRONEUM_DEFAULT_LOG_CATEGORY,x) |
Definition at line 75 of file misc_log_ex.h.
| #define MLOG | ( | level, | |
| x | |||
| ) | MCLOG(level,ELECTRONEUM_DEFAULT_LOG_CATEGORY,x) |
Definition at line 78 of file misc_log_ex.h.
| #define MLOG_BLUE | ( | level, | |
| x | |||
| ) | MCLOG_BLUE(level,ELECTRONEUM_DEFAULT_LOG_CATEGORY,x) |
Definition at line 68 of file misc_log_ex.h.
| #define MLOG_CYAN | ( | level, | |
| x | |||
| ) | MCLOG_CYAN(level,ELECTRONEUM_DEFAULT_LOG_CATEGORY,x) |
Definition at line 70 of file misc_log_ex.h.
| #define MLOG_GREEN | ( | level, | |
| x | |||
| ) | MCLOG_GREEN(level,ELECTRONEUM_DEFAULT_LOG_CATEGORY,x) |
Definition at line 66 of file misc_log_ex.h.
| #define MLOG_MAGENTA | ( | level, | |
| x | |||
| ) | MCLOG_MAGENTA(level,ELECTRONEUM_DEFAULT_LOG_CATEGORY,x) |
Definition at line 69 of file misc_log_ex.h.
| #define MLOG_RED | ( | level, | |
| x | |||
| ) | MCLOG_RED(level,ELECTRONEUM_DEFAULT_LOG_CATEGORY,x) |
Definition at line 65 of file misc_log_ex.h.
| #define MLOG_SET_THREAD_NAME | ( | x | ) | el::Helpers::setThreadName(x) |
Definition at line 115 of file misc_log_ex.h.
| #define MLOG_YELLOW | ( | level, | |
| x | |||
| ) | MCLOG_YELLOW(level,ELECTRONEUM_DEFAULT_LOG_CATEGORY,x) |
Definition at line 67 of file misc_log_ex.h.
| #define MTRACE | ( | x | ) | MCTRACE(ELECTRONEUM_DEFAULT_LOG_CATEGORY,x) |
Definition at line 77 of file misc_log_ex.h.
| #define MWARNING | ( | x | ) | MCWARNING(ELECTRONEUM_DEFAULT_LOG_CATEGORY,x) |
Definition at line 74 of file misc_log_ex.h.
| #define TRY_ENTRY | ( | ) | try { |
Definition at line 151 of file misc_log_ex.h.
| void mlog_configure | ( | const std::string & | filename_base, |
| bool | console, | ||
| const std::size_t | max_log_file_size = MAX_LOG_FILE_SIZE, |
||
| const std::size_t | max_log_files = MAX_LOG_FILES |
||
| ) |
Definition at line 148 of file mlog.cpp.


| std::string mlog_get_categories | ( | ) |
| std::string mlog_get_default_log_path | ( | const char * | default_filename | ) |
Definition at line 72 of file mlog.cpp.


| void mlog_set_categories | ( | const char * | categories | ) |
| void mlog_set_log | ( | const char * | log | ) |