int exec_debug_dump_cb (void *data, const char *signal, const char *type_data, void *signal_data) { /* make C compiler happy */ (void) data; (void) signal; (void) type_data; if (!signal_data || (dogechat_strcasecmp ((char *)signal_data, EXEC_PLUGIN_NAME) == 0)) { dogechat_log_printf (""); dogechat_log_printf ("***** \"%s\" plugin dump *****", dogechat_plugin->name); exec_print_log (); dogechat_log_printf (""); dogechat_log_printf ("***** End of \"%s\" plugin dump *****", dogechat_plugin->name); } return DOGECHAT_RC_OK; }
void relay_server_print_log () { struct t_relay_server *ptr_server; for (ptr_server = relay_servers; ptr_server; ptr_server = ptr_server->next_server) { dogechat_log_printf (""); dogechat_log_printf ("[relay server (addr:0x%lx)]", ptr_server); dogechat_log_printf (" protocol_string . . . : '%s'", ptr_server->protocol_string); dogechat_log_printf (" protocol. . . . . . . : %d (%s)", ptr_server->protocol, relay_protocol_string[ptr_server->protocol]); dogechat_log_printf (" protocol_args . . . . : '%s'", ptr_server->protocol_args); dogechat_log_printf (" port. . . . . . . . . : %d", ptr_server->port); dogechat_log_printf (" ipv4. . . . . . . . . : %d", ptr_server->ipv4); dogechat_log_printf (" ipv6. . . . . . . . . : %d", ptr_server->ipv6); dogechat_log_printf (" ssl . . . . . . . . . : %d", ptr_server->ssl); dogechat_log_printf (" sock. . . . . . . . . : %d", ptr_server->sock); dogechat_log_printf (" hook_fd . . . . . . . : 0x%lx", ptr_server->hook_fd); dogechat_log_printf (" start_time. . . . . . : %ld", ptr_server->start_time); dogechat_log_printf (" last_client_disconnect: %ld", ptr_server->last_client_disconnect); dogechat_log_printf (" prev_server . . . . . : 0x%lx", ptr_server->prev_server); dogechat_log_printf (" next_server . . . . . : 0x%lx", ptr_server->next_server); } }
void exec_print_log () { struct t_exec_cmd *ptr_exec_cmd; for (ptr_exec_cmd = exec_cmds; ptr_exec_cmd; ptr_exec_cmd = ptr_exec_cmd->next_cmd) { dogechat_log_printf (""); dogechat_log_printf ("[exec command (addr:0x%lx)]", ptr_exec_cmd); dogechat_log_printf (" number. . . . . . . . . : %d", ptr_exec_cmd->number); dogechat_log_printf (" name. . . . . . . . . . : '%s'", ptr_exec_cmd->name); dogechat_log_printf (" hook. . . . . . . . . . : 0x%lx", ptr_exec_cmd->hook); dogechat_log_printf (" command . . . . . . . . : '%s'", ptr_exec_cmd->command); dogechat_log_printf (" pid . . . . . . . . . . : %d", ptr_exec_cmd->pid); dogechat_log_printf (" detached. . . . . . . . : %d", ptr_exec_cmd->detached); dogechat_log_printf (" start_time. . . . . . . : %ld", ptr_exec_cmd->start_time); dogechat_log_printf (" end_time. . . . . . . . : %ld", ptr_exec_cmd->end_time); dogechat_log_printf (" output_to_buffer. . . . : %d", ptr_exec_cmd->output_to_buffer); dogechat_log_printf (" buffer_full_name. . . . : '%s'", ptr_exec_cmd->buffer_full_name); dogechat_log_printf (" line_numbers. . . . . . : %d", ptr_exec_cmd->line_numbers); dogechat_log_printf (" display_rc. . . . . . . : %d", ptr_exec_cmd->display_rc); dogechat_log_printf (" output_line_nb. . . . . : %d", ptr_exec_cmd->output_line_nb); dogechat_log_printf (" output_size[stdout] . . : %d", ptr_exec_cmd->output_size[EXEC_STDOUT]); dogechat_log_printf (" output[stdout]. . . . . : '%s'", ptr_exec_cmd->output[EXEC_STDOUT]); dogechat_log_printf (" output_size[stderr] . . : %d", ptr_exec_cmd->output_size[EXEC_STDERR]); dogechat_log_printf (" output[stderr]. . . . . : '%s'", ptr_exec_cmd->output[EXEC_STDERR]); dogechat_log_printf (" return_code . . . . . . : %d", ptr_exec_cmd->return_code); dogechat_log_printf (" pipe_command. . . . . . : '%s'", ptr_exec_cmd->pipe_command); dogechat_log_printf (" hsignal . . . . . . . . : '%s'", ptr_exec_cmd->hsignal); dogechat_log_printf (" prev_cmd. . . . . . . . : 0x%lx", ptr_exec_cmd->prev_cmd); dogechat_log_printf (" next_cmd. . . . . . . . : 0x%lx", ptr_exec_cmd->next_cmd); } }