Init logging handlers in client.

This commit is contained in:
Michael Jumper 2011-11-27 14:26:59 -08:00
parent 9c5f1da646
commit 2d7b398c72

View File

@ -60,6 +60,14 @@ typedef struct client_thread_data {
} client_thread_data; } client_thread_data;
void __guacd_log_info(guac_client* client, const char* format, va_list args) {
vsyslog(LOG_INFO, format, args);
}
void __guacd_log_error(guac_client* client, const char* format, va_list args) {
vsyslog(LOG_ERR, format, args);
}
void* start_client_thread(void* data) { void* start_client_thread(void* data) {
guac_client* client; guac_client* client;
@ -170,6 +178,10 @@ void* start_client_thread(void* data) {
return NULL; return NULL;
} }
/* Set up logging in client */
client->log_info_handler = __guacd_log_info;
client->log_error_handler = __guacd_log_error;
/* Start client threads */ /* Start client threads */
syslog(LOG_INFO, "Starting client"); syslog(LOG_INFO, "Starting client");
if (guac_start_client(client)) if (guac_start_client(client))