Skip to content

Commit

Permalink
Clean-up
Browse files Browse the repository at this point in the history
Signed-off-by: Leanid Astrakou <lastrakou@rocketsoftware.com>
  • Loading branch information
DivergentEuropeans committed Aug 24, 2023
1 parent b201559 commit 74b0811
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,6 @@ static void set_sys_messages(ConfigManager *configmgr) {
return;
}
JsonArray *sys_messages = jsonAsArray(env);

int count = jsonArrayGetCount(sys_messages);
printf("\nWHATS OUR SYSMSG COUNT %d?", count);
for (int i = 0; i < count; i++) {
char *sys_message = jsonArrayGetString(sys_messages, i);
printf("SYS MESSAGE HERE: %s\n", sys_message);
}

if (sys_messages) {
zl_context.sys_messages = sys_messages;
Expand All @@ -206,8 +199,6 @@ static void check_for_and_print_sys_message(const char* fmt, ...) {
vsnprintf(input_string, sizeof(input_string), fmt, args);
va_end(args);

//printf("\nIS THIS EVEN FORMATTED %s ", input_string);

/* Uncomment code to try to pull ID from input_string
// Extract the ID from input_string
char msg_id[256]; // assuming the ID will not exceed 255 characters
Expand All @@ -229,7 +220,6 @@ static void check_for_and_print_sys_message(const char* fmt, ...) {
for (int i = 0; i < count; i++) {
const char *sys_message_id = jsonArrayGetString(zl_context.sys_messages, i);
if (sys_message_id && strstr(input_string, sys_message_id)) {
printf("\nMATCH - SYS MESSAGE ID: |%s| MESSAGE ID FROM EXTRACTED OUTPUT |%s|", sys_message_id, input_string);
wtoPrintf3(input_string); // Print our match to the syslog
break;
}
Expand Down Expand Up @@ -1529,7 +1519,7 @@ static int process_workspace_dir(ConfigManager *configmgr) {
}

static void print_line(void *data, const char *line) {
printf("YEEEEET?%s", line);
printf("%s", line);
check_for_and_print_sys_message(line);
}

Expand Down

0 comments on commit 74b0811

Please sign in to comment.