From 2d7b398c729f20b7e95989d1bc85ede627e5cc3f Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sun, 27 Nov 2011 14:26:59 -0800 Subject: [PATCH] Init logging handlers in client. --- guacd/src/daemon.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/guacd/src/daemon.c b/guacd/src/daemon.c index bd30a8e1..53675523 100644 --- a/guacd/src/daemon.c +++ b/guacd/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))