add log-mem function to collect log
This commit is contained in:
@@ -60,6 +60,7 @@ void get_common_options(void) {
|
||||
uint32_t nonbiot;
|
||||
uint32_t rfsim;
|
||||
uint32_t basicsim;
|
||||
char *logmem_filename = NULL;
|
||||
paramdef_t cmdline_params[] =CMDLINE_PARAMS_DESC ;
|
||||
paramdef_t cmdline_logparams[] =CMDLINE_LOGPARAMS_DESC ;
|
||||
checkedparam_t cmdline_log_CheckParams[] = CMDLINE_LOGPARAMS_CHECK_DESC;
|
||||
@@ -80,6 +81,13 @@ void get_common_options(void) {
|
||||
load_module_shlib("telnetsrv",NULL,0,NULL);
|
||||
}
|
||||
|
||||
if (logmem_filename != NULL && strlen(logmem_filename) > 0) {
|
||||
log_mem_filename = &logmem_filename[0];
|
||||
log_mem_flag = 1;
|
||||
printf("Enabling OPT for log save at memory %s\n",log_mem_filename);
|
||||
logInit_log_mem();
|
||||
}
|
||||
|
||||
if (noS1) {
|
||||
set_softmodem_optmask(SOFTMODEM_NOS1_BIT);
|
||||
}
|
||||
|
||||
@@ -279,7 +279,7 @@ void exit_function(const char *file, const char *function, const int line, const
|
||||
if (s != NULL) {
|
||||
printf("%s:%d %s() Exiting OAI softmodem: %s\n",file,line, function, s);
|
||||
}
|
||||
|
||||
close_log_mem();
|
||||
oai_exit = 1;
|
||||
|
||||
if (RC.ru == NULL)
|
||||
|
||||
@@ -222,6 +222,7 @@
|
||||
{"g" , CONFIG_HLP_LOGL, 0, uptr:&glog_level, defintval:0, TYPE_UINT, 0}, \
|
||||
{"telnetsrv", CONFIG_HLP_TELN, PARAMFLAG_BOOL, uptr:&start_telnetsrv, defintval:0, TYPE_UINT, 0}, \
|
||||
{"msc", CONFIG_HLP_MSC, PARAMFLAG_BOOL, uptr:&START_MSC, defintval:0, TYPE_UINT, 0}, \
|
||||
{"log-mem", NULL, 0, strptr:(char **)&logmem_filename, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
}
|
||||
#define CMDLINE_ONLINELOG_IDX 0
|
||||
#define CMDLINE_GLOGLEVEL_IDX 1
|
||||
@@ -233,6 +234,7 @@
|
||||
{ .s2= { config_check_intrange, {0,4}}}, \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
}
|
||||
|
||||
/***************************************************************************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user