From: Michael Jumper Date: Sun, 27 Nov 2011 22:26:59 +0000 (-0800) Subject: Init logging handlers in client. X-Git-Url: http://git.alex.org.uk Init logging handlers in client. --- diff --git a/src/daemon.c b/src/daemon.c index bd30a8e..5367552 100644 --- a/src/daemon.c +++ b/src/daemon.c @@ -60,6 +60,14 @@ typedef struct 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) { guac_client* client; @@ -170,6 +178,10 @@ void* start_client_thread(void* data) { return NULL; } + /* Set up logging in client */ + client->log_info_handler = __guacd_log_info; + client->log_error_handler = __guacd_log_error; + /* Start client threads */ syslog(LOG_INFO, "Starting client"); if (guac_start_client(client))