runing with ledger interface
This commit is contained in:
@@ -334,8 +334,8 @@ void init_loggers_bydevid(const std::string& dev_id)
|
||||
const ledger_monitor& monitor = term.line[j];
|
||||
if (!monitor.monitor_id.empty()) {
|
||||
std::ostringstream mon_key_c, mon_key_d, mon_path, mon_name;
|
||||
mon_key_c << "monitor." << monitor.monitor_id << ".COM";
|
||||
mon_key_d << "monitor." << monitor.monitor_id << ".DATA";
|
||||
mon_key_c << "monitor." << term.terminal_id << "." << monitor.logical_device_seq << ".COM";
|
||||
mon_key_d << "monitor." << term.terminal_id << "." << monitor.logical_device_seq << ".DATA";
|
||||
mon_path << device_dir << "/monitor" << j;
|
||||
mon_name << monitor.monitor_id;
|
||||
|
||||
@@ -355,7 +355,7 @@ void init_loggers_bydevid(const std::string& dev_id)
|
||||
logger_map[mon_key_c.str()] = TypedLogger(mon_logger_c, LOGTYPE_COM);
|
||||
logger_map[mon_key_d.str()] = TypedLogger(mon_logger_d, LOGTYPE_DATA);
|
||||
|
||||
DIY_WARNLOG(mon_key_d.str().c_str(), "【WARN】监测点:%s - id:%s监测点级日志初始化完毕", monitor.monitor_name.c_str(), monitor.monitor_id.c_str());
|
||||
DIY_WARNLOG(mon_key_d.str().c_str(), "【WARN】监测点:%s - id:%s监测点级日志初始化完毕", monitor.monitor_name.c_str(), monitor.logical_device_seq.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -406,8 +406,8 @@ void init_loggers()
|
||||
|
||||
if (!monitor.monitor_id.empty()) {
|
||||
std::ostringstream mon_key_c, mon_key_d, mon_path, mon_name;
|
||||
mon_key_c << "monitor." << monitor.monitor_id << ".COM";
|
||||
mon_key_d << "monitor." << monitor.monitor_id << ".DATA";
|
||||
mon_key_c << "monitor." << term.terminal_id << "." << monitor.logical_device_seq << ".COM";
|
||||
mon_key_d << "monitor." << term.terminal_id << "." << monitor.logical_device_seq << ".DATA";
|
||||
|
||||
mon_path << device_dir << "/monitor" << i; // 用monitor+序号作为目录
|
||||
mon_name << monitor.monitor_id;
|
||||
@@ -425,7 +425,7 @@ void init_loggers()
|
||||
logger_map[mon_key_d.str()] = TypedLogger(mon_logger_d, LOGTYPE_DATA);
|
||||
|
||||
DIY_WARNLOG(mon_key_d.str().c_str(), "【WARN】监测点:%s - id:%s监测点级日志初始化完毕",
|
||||
monitor.monitor_name.c_str(), monitor.monitor_id.c_str());
|
||||
monitor.monitor_name.c_str(), monitor.logical_device_seq.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user