Commit b26dc726 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Improve log view

parent aec38a2f
...@@ -40,30 +40,27 @@ void statistics::display() { ...@@ -40,30 +40,27 @@ void statistics::display() {
//Logger::amf_app().info("--------------------------------------------------"); //Logger::amf_app().info("--------------------------------------------------");
//Logger::amf_app().info("| %d | %d | %d |",gNB_connected,UE_connected,UE_registred); //Logger::amf_app().info("| %d | %d | %d |",gNB_connected,UE_connected,UE_registred);
//Logger::amf_app().info("--------------------------------------------------"); //Logger::amf_app().info("--------------------------------------------------");
Logger::amf_app().info("|-----------------------------------------------------------------------------------------------------------------|"); Logger::amf_app().info("|----------------------------------------------------------------------------------------------------------------|");
Logger::amf_app().info("|----------------------------------------------------gNBs' information--------------------------------------------|"); Logger::amf_app().info("|----------------------------------------------------gNBs' information-------------------------------------------|");
Logger::amf_app().info("| Index | Status | Global ID | gNB Name | Tracking Area (PLMN, TAC)| "); Logger::amf_app().info("| Index | Status | Global ID | gNB Name | Tracking Area (PLMN, TAC) |");
if (gnbs.size() ==0 ) { if (gnbs.size() ==0 ) {
Logger::amf_app().info("| - | - | - | - | - | "); Logger::amf_app().info("| - | - | - | - | - |");
} }
//TODO: Show the list of common PLMNs //TODO: Show the list of common PLMNs
for (int i = 0; i < gnbs.size(); i++) { for (int i = 0; i < gnbs.size(); i++) {
Logger::amf_app().info("| %d | Connected | 0x%x | %s |%s,%d | ", i + 1, gnbs[i].gnb_id, gnbs[i].gnb_name.c_str(), (gnbs[i].mcc + gnbs[i].mnc).c_str(), gnbs[i].tac); Logger::amf_app().info("| %d | Connected | 0x%x | %s | %s, %d | ", i + 1, gnbs[i].gnb_id, gnbs[i].gnb_name.c_str(), (gnbs[i].mcc + gnbs[i].mnc).c_str(), gnbs[i].tac);
//Logger::amf_app().info("[index %d][connected][GlobalID: 0x%x][gnb name: %s][Tracking Area: plmn(%s), tac(%d)]", i + 1, gnbs[i].gnb_id, gnbs[i].gnb_name.c_str(), (gnbs[i].mcc + gnbs[i].mnc).c_str(), gnbs[i].tac); }
} Logger::amf_app().info("|----------------------------------------------------------------------------------------------------------------|");
Logger::amf_app().info("|-----------------------------------------------------------------------------------------------------------------|");
Logger::amf_app().info(""); Logger::amf_app().info("");
Logger::amf_app().info("|----------------------------------------------------------------------------------------------------------------|"); Logger::amf_app().info("|----------------------------------------------------------------------------------------------------------------|");
Logger::amf_app().info("|----------------------------------------------------UEs' information--------------------------------------------|"); Logger::amf_app().info("|----------------------------------------------------UEs' information--------------------------------------------|");
Logger::amf_app().info("| Index | Connection state | Registration state | IMSI | GUTI |RAN UE NGAP ID|AMF UE ID|"); Logger::amf_app().info("| Index | Connection state | Registration state | IMSI | GUTI | RAN UE NGAP ID | AMF UE ID |");
for (int i = 0; i < ues.size(); i++) { for (int i = 0; i < ues.size(); i++) {
//Logger::amf_app().info("[index %d][%s][%s][imsi %s][guti %s]", i + 1, ues[i].connStatus.c_str(), ues[i].registerStatus.c_str(), ues[i].imsi.c_str(), ues[i].guti.c_str()); Logger::amf_app().info("| %d | %s | %s | %s | %s | %d | %d | ", i + 1, ues[i].connStatus.c_str(), ues[i].registerStatus.c_str(), ues[i].imsi.c_str(), ues[i].guti.c_str(), ues[i].ranid, ues[i].amfid);
Logger::amf_app().info("| %d | %s | %s | %s | %s | %d | %d | ", i + 1, ues[i].connStatus.c_str(), ues[i].registerStatus.c_str(), ues[i].imsi.c_str(), ues[i].guti.c_str(), ues[i].ranid, ues[i].amfid);
//Logger::amf_app().info("Current ran_ue_ngap_id[%d]; Current amf_ue_ngap_id[%d]", ues[i].ranid, ues[i].amfid); //Logger::amf_app().info("Current ran_ue_ngap_id[%d]; Current amf_ue_ngap_id[%d]", ues[i].ranid, ues[i].amfid);
Logger::amf_app().info("Location[NrCgi][PLMN(%s), cellID(%d)]", (ues[i].mcc + ues[i].mnc).c_str(), ues[i].cellId); Logger::amf_app().info("Location [NrCgi][PLMN(%s), cellID(%d)]", (ues[i].mcc + ues[i].mnc).c_str(), ues[i].cellId);
Logger::amf_app().info(""); Logger::amf_app().info("");
} }
Logger::amf_app().info("|----------------------------------------------------------------------------------------------------------------|"); Logger::amf_app().info("|----------------------------------------------------------------------------------------------------------------|");
......
...@@ -65,13 +65,13 @@ void Logger::_init(const char *app, const bool log_stdout, const bool log_rot_fi ...@@ -65,13 +65,13 @@ void Logger::_init(const char *app, const bool log_stdout, const bool log_rot_fi
m_async_cmd = new _Logger("asnyc_c", m_sinks, ss.str().c_str()); m_async_cmd = new _Logger("asnyc_c", m_sinks, ss.str().c_str());
m_amf_app = new _Logger("amf_app", m_sinks, ss.str().c_str()); m_amf_app = new _Logger("amf_app", m_sinks, ss.str().c_str());
m_config = new _Logger("configurations", m_sinks, ss.str().c_str()); m_config = new _Logger("configurations", m_sinks, ss.str().c_str());
m_system = new _Logger("system", m_sinks, ss.str().c_str()); m_system = new _Logger("system ", m_sinks, ss.str().c_str());
m_sctp = new _Logger("sctp", m_sinks, ss.str().c_str()); m_sctp = new _Logger("sctp ", m_sinks, ss.str().c_str());
m_nas_mm = new _Logger("nas_mm", m_sinks, ss.str().c_str()); m_nas_mm = new _Logger("nas_mm ", m_sinks, ss.str().c_str());
m_ngap = new _Logger("ngap", m_sinks, ss.str().c_str()); m_ngap = new _Logger("ngap ", m_sinks, ss.str().c_str());
m_itti = new _Logger("itti", m_sinks, ss.str().c_str()); m_itti = new _Logger("itti ", m_sinks, ss.str().c_str());
m_amf_n2 = new _Logger("amf_n2", m_sinks, ss.str().c_str()); m_amf_n2 = new _Logger("amf_n2 ", m_sinks, ss.str().c_str());
m_amf_n1 = new _Logger("amf_n1", m_sinks, ss.str().c_str()); m_amf_n1 = new _Logger("amf_n1 ", m_sinks, ss.str().c_str());
m_amf_n11 = new _Logger("amf_n11", m_sinks, ss.str().c_str()); m_amf_n11 = new _Logger("amf_n11", m_sinks, ss.str().c_str());
m_amf_server = new _Logger("amf_server", m_sinks, ss.str().c_str()); m_amf_server = new _Logger("amf_server", m_sinks, ss.str().c_str());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment