add log level control by ledger
This commit is contained in:
@@ -39,6 +39,15 @@ extern LOG_TLS_SPEC int g_log_code_tls;
|
||||
# define PRINTF_LIKE(fmt_index, first_arg)
|
||||
#endif
|
||||
/////////////////////////////////////////
|
||||
|
||||
struct LogLevelCache { //日志等级缓存
|
||||
// terminal_id -> min_level
|
||||
std::unordered_map<std::string, int> term_min;
|
||||
// monitor_id -> min_level
|
||||
std::unordered_map<std::string, int> mp_min;
|
||||
};
|
||||
|
||||
////////////////////////////////////
|
||||
struct TypedLogger {
|
||||
log4cplus::Logger logger;
|
||||
int logtype;
|
||||
@@ -67,9 +76,8 @@ extern DebugSwitch g_debug_switch;
|
||||
|
||||
extern void send_reply_to_queue(const std::string& guid, const int code, const std::string& result);
|
||||
|
||||
|
||||
//std::string get_front_type_from_subdir();
|
||||
|
||||
extern std::shared_ptr<LogLevelCache> g_level_cache_sp;
|
||||
const char* loglevel_to_str(int lv);
|
||||
|
||||
// 不带 Appender 的版本
|
||||
log4cplus::Logger init_logger(const std::string& full_name,
|
||||
|
||||
Reference in New Issue
Block a user