FS-5271 --resolve
This commit is contained in:
parent
16c1cc7df7
commit
61c65b47ca
|
@ -83,6 +83,7 @@ static cli_profile_t *global_profile;
|
||||||
static int running = 1;
|
static int running = 1;
|
||||||
static int thread_running = 0;
|
static int thread_running = 0;
|
||||||
static char *filter_uuid;
|
static char *filter_uuid;
|
||||||
|
static char *logfilter;
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
static EditLine *el;
|
static EditLine *el;
|
||||||
static History *myhistory;
|
static History *myhistory;
|
||||||
|
@ -731,6 +732,12 @@ static void *msg_thread_run(esl_thread_t *me, void *obj)
|
||||||
DWORD len = (DWORD) strlen(handle->last_event->body);
|
DWORD len = (DWORD) strlen(handle->last_event->body);
|
||||||
DWORD outbytes = 0;
|
DWORD outbytes = 0;
|
||||||
#endif
|
#endif
|
||||||
|
if (logfilter) {
|
||||||
|
if (!strstr(handle->last_event->body, logfilter)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (lname) {
|
if (lname) {
|
||||||
level = atoi(lname);
|
level = atoi(lname);
|
||||||
}
|
}
|
||||||
|
@ -806,6 +813,7 @@ static const char *cli_usage =
|
||||||
"/log, /nolog \tLog commands.\n"
|
"/log, /nolog \tLog commands.\n"
|
||||||
"/uuid \tFilter logs for a single call uuid\n"
|
"/uuid \tFilter logs for a single call uuid\n"
|
||||||
"/filter \tFilter commands.\n"
|
"/filter \tFilter commands.\n"
|
||||||
|
"/logfilter \tFilter Log for a single string.\n"
|
||||||
"/debug [0-7] \tSet debug level.\n"
|
"/debug [0-7] \tSet debug level.\n"
|
||||||
"\n";
|
"\n";
|
||||||
|
|
||||||
|
@ -826,6 +834,18 @@ static int process_command(esl_handle_t *handle, const char *cmd)
|
||||||
) {
|
) {
|
||||||
esl_log(ESL_LOG_INFO, "Goodbye!\nSee you at ClueCon http://www.cluecon.com/\n");
|
esl_log(ESL_LOG_INFO, "Goodbye!\nSee you at ClueCon http://www.cluecon.com/\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
} else if (!strncasecmp(cmd, "logfilter", 9)) {
|
||||||
|
cmd += 9;
|
||||||
|
while (*cmd && *cmd == ' ') {
|
||||||
|
cmd++;
|
||||||
|
}
|
||||||
|
if (!esl_strlen_zero(cmd)) {
|
||||||
|
esl_safe_free(logfilter);
|
||||||
|
logfilter = strdup(cmd);
|
||||||
|
} else {
|
||||||
|
esl_safe_free(logfilter);
|
||||||
|
}
|
||||||
|
output_printf("Logfilter %s\n", logfilter ? "enabled" : "disabled");
|
||||||
} else if (!strncasecmp(cmd, "uuid", 4)) {
|
} else if (!strncasecmp(cmd, "uuid", 4)) {
|
||||||
cmd += 4;
|
cmd += 4;
|
||||||
while (*cmd && *cmd == ' ') {
|
while (*cmd && *cmd == ' ') {
|
||||||
|
|
Loading…
Reference in New Issue