From ff98e6ea68ef0c7a61f65a215181c923f0387e84 Mon Sep 17 00:00:00 2001 From: Lionel Gauthier <lionel.gauthier@eurecom.fr> Date: Fri, 10 Apr 2015 12:22:44 +0000 Subject: [PATCH] OK for start of MME_GW and HSS on same host git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7112 818b1a75-f10b-46b9-bf7c-635c3b92a50f --- openair2/UTIL/LOG/log.c | 84 ++++++++++++++------------- openair2/UTIL/LOG/log.h | 1 + openair2/UTIL/LOG/vcd_signal_dumper.c | 1 + openair2/UTIL/LOG/vcd_signal_dumper.h | 1 + 4 files changed, 47 insertions(+), 40 deletions(-) diff --git a/openair2/UTIL/LOG/log.c b/openair2/UTIL/LOG/log.c index 06fc54caa1..b22dfb0ee9 100755 --- a/openair2/UTIL/LOG/log.c +++ b/openair2/UTIL/LOG/log.c @@ -132,6 +132,7 @@ int logInit (void) #endif } +#if ! defined(CN_BUILD) g_log->log_component[PHY].name = "PHY"; g_log->log_component[PHY].level = LOG_EMERG; g_log->log_component[PHY].flag = LOG_MED; @@ -180,14 +181,6 @@ int logInit (void) g_log->log_component[RRC].filelog = 0; g_log->log_component[RRC].filelog_name = "/tmp/rrc.log"; - g_log->log_component[NAS].name = "NAS"; - g_log->log_component[NAS].level = LOG_TRACE; - g_log->log_component[NAS].flag = LOG_MED; - g_log->log_component[NAS].interval = 1; - g_log->log_component[NAS].fd = 0; - g_log->log_component[NAS].filelog = 0; - g_log->log_component[NAS].filelog_name = "/tmp/nas.log"; - g_log->log_component[EMU].name = "EMU"; g_log->log_component[EMU].level = LOG_EMERG; g_log->log_component[EMU].flag = LOG_MED; @@ -300,38 +293,6 @@ int logInit (void) g_log->log_component[OCM].filelog = 0; g_log->log_component[OCM].filelog_name = "/tmp/ocm.log"; - g_log->log_component[UDP_].name = "UDP"; - g_log->log_component[UDP_].level = LOG_EMERG; - g_log->log_component[UDP_].flag = LOG_FULL; - g_log->log_component[UDP_].interval = 1; - g_log->log_component[UDP_].fd = 0; - g_log->log_component[UDP_].filelog = 0; - g_log->log_component[UDP_].filelog_name = ""; - - g_log->log_component[GTPU].name = "GTPV1U"; - g_log->log_component[GTPU].level = LOG_EMERG; - g_log->log_component[GTPU].flag = LOG_FULL; - g_log->log_component[GTPU].interval = 1; - g_log->log_component[GTPU].fd = 0; - g_log->log_component[GTPU].filelog = 0; - g_log->log_component[GTPU].filelog_name = ""; - - g_log->log_component[S1AP].name = "S1AP"; - g_log->log_component[S1AP].level = LOG_EMERG; - g_log->log_component[S1AP].flag = LOG_FULL; - g_log->log_component[S1AP].interval = 1; - g_log->log_component[S1AP].fd = 0; - g_log->log_component[S1AP].filelog = 0; - g_log->log_component[S1AP].filelog_name = ""; - - g_log->log_component[SCTP].name = "SCTP"; - g_log->log_component[SCTP].level = LOG_EMERG; - g_log->log_component[SCTP].flag = LOG_MED; - g_log->log_component[SCTP].interval = 1; - g_log->log_component[SCTP].fd = 0; - g_log->log_component[SCTP].filelog = 0; - g_log->log_component[SCTP].filelog_name = ""; - g_log->log_component[HW].name = "HW"; g_log->log_component[HW].level = LOG_EMERG; g_log->log_component[HW].flag = LOG_MED; @@ -396,6 +357,47 @@ int logInit (void) g_log->log_component[LOCALIZE].fd = 0; g_log->log_component[LOCALIZE].filelog = 0; g_log->log_component[LOCALIZE].filelog_name = "/tmp/localize.log"; +#endif // ! defined(CN_BUILD) + + g_log->log_component[NAS].name = "NAS"; + g_log->log_component[NAS].level = LOG_TRACE; + g_log->log_component[NAS].flag = LOG_MED; + g_log->log_component[NAS].interval = 1; + g_log->log_component[NAS].fd = 0; + g_log->log_component[NAS].filelog = 0; + g_log->log_component[NAS].filelog_name = "/tmp/nas.log"; + + g_log->log_component[UDP_].name = "UDP"; + g_log->log_component[UDP_].level = LOG_EMERG; + g_log->log_component[UDP_].flag = LOG_FULL; + g_log->log_component[UDP_].interval = 1; + g_log->log_component[UDP_].fd = 0; + g_log->log_component[UDP_].filelog = 0; + g_log->log_component[UDP_].filelog_name = ""; + + g_log->log_component[GTPU].name = "GTPV1U"; + g_log->log_component[GTPU].level = LOG_EMERG; + g_log->log_component[GTPU].flag = LOG_FULL; + g_log->log_component[GTPU].interval = 1; + g_log->log_component[GTPU].fd = 0; + g_log->log_component[GTPU].filelog = 0; + g_log->log_component[GTPU].filelog_name = ""; + + g_log->log_component[S1AP].name = "S1AP"; + g_log->log_component[S1AP].level = LOG_EMERG; + g_log->log_component[S1AP].flag = LOG_FULL; + g_log->log_component[S1AP].interval = 1; + g_log->log_component[S1AP].fd = 0; + g_log->log_component[S1AP].filelog = 0; + g_log->log_component[S1AP].filelog_name = ""; + + g_log->log_component[SCTP].name = "SCTP"; + g_log->log_component[SCTP].level = LOG_EMERG; + g_log->log_component[SCTP].flag = LOG_MED; + g_log->log_component[SCTP].interval = 1; + g_log->log_component[SCTP].fd = 0; + g_log->log_component[SCTP].filelog = 0; + g_log->log_component[SCTP].filelog_name = ""; g_log->level2string[LOG_EMERG] = "G"; //EMERG g_log->level2string[LOG_ALERT] = "A"; // ALERT @@ -425,7 +427,9 @@ int logInit (void) g_log->filelog_name = "/tmp/openair.log"; if (g_log->syslog) { +#if ! defined(CN_BUILD) openlog(g_log->log_component[EMU].name, LOG_PID, g_log->config.facility); +#endif // ! defined(CN_BUILD) } if (g_log->filelog) { diff --git a/openair2/UTIL/LOG/log.h b/openair2/UTIL/LOG/log.h index d77ef2ce15..c6eedf6bb3 100755 --- a/openair2/UTIL/LOG/log.h +++ b/openair2/UTIL/LOG/log.h @@ -335,6 +335,7 @@ typedef enum log_instance_type_e { void log_set_instance_type (log_instance_type_t instance); #endif +int logInit (void); /*--- INCLUDES ---------------------------------------------------------------*/ # include "log_if.h" diff --git a/openair2/UTIL/LOG/vcd_signal_dumper.c b/openair2/UTIL/LOG/vcd_signal_dumper.c index 317cc76277..1ab7bef405 100644 --- a/openair2/UTIL/LOG/vcd_signal_dumper.c +++ b/openair2/UTIL/LOG/vcd_signal_dumper.c @@ -227,6 +227,7 @@ const char* eurecomFunctionsNames[] = { "pdcp_apply_security", "pdcp_validate_security", /* RRC signals */ + "rrc_rx_tx", "rrc_mac_config_req", "rrc_ue_decode_sib1", "rrc_ue_decode_si", diff --git a/openair2/UTIL/LOG/vcd_signal_dumper.h b/openair2/UTIL/LOG/vcd_signal_dumper.h index 9574084eb0..4acbd67248 100644 --- a/openair2/UTIL/LOG/vcd_signal_dumper.h +++ b/openair2/UTIL/LOG/vcd_signal_dumper.h @@ -201,6 +201,7 @@ typedef enum { VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_VALIDATE_SECURITY, /* RRC signals */ + VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_RX_TX, VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_UE_DECODE_SIB1, VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_UE_DECODE_SI, -- GitLab