From 5d65b0a6a7c03af7e3ef90df2cab97290a127b32 Mon Sep 17 00:00:00 2001 From: Jack Ding Date: Wed, 18 Apr 2018 14:14:28 -0400 Subject: [PATCH] Turn on Guest-Client logs on centos guest image Currently Guest-Client logs are written to syslog's daemon facility with 'debug' level, however syslog conf in tis-centos-guest.img only has 'info' level turned on for daemon facility. Change the debug level to 'info' so that Guest-Client logs can be written to /var/log/messages. This will help debugging future guest heartbeat issues. Also fix typo in guest_heartbeat_enabled_state_health_check() trace. Change-Id: Iab72cce9be2986c6cafb79fa66aed6edfb36f32d --- guest-client/centos/build_srpm.data | 2 +- guest-client/guest-client-3.0.1/guest_client/src/guest_debug.c | 2 +- .../guest_client/src/heartbeat/guest_heartbeat_enabled_state.c | 2 +- .../guest-client-3.0.1/guest_client_api/guest_api_debug.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/guest-client/centos/build_srpm.data b/guest-client/centos/build_srpm.data index f3386382..6d28f995 100644 --- a/guest-client/centos/build_srpm.data +++ b/guest-client/centos/build_srpm.data @@ -1,3 +1,3 @@ SRC_DIR=$CGCS_BASE/mwa-thales/guest-client COPY_LIST="$SRC_DIR/*" -TIS_PATCH_VER=5 +TIS_PATCH_VER=6 diff --git a/guest-client/guest-client-3.0.1/guest_client/src/guest_debug.c b/guest-client/guest-client-3.0.1/guest_client/src/guest_debug.c index 4b55d3a0..09a3892d 100755 --- a/guest-client/guest-client-3.0.1/guest_client/src/guest_debug.c +++ b/guest-client/guest-client-3.0.1/guest_client/src/guest_debug.c @@ -106,7 +106,7 @@ void guest_debug_log( const char* format, ... ) } #ifdef GUEST_DEBUG_WANT_SYSLOG - syslog(LOG_DEBUG, "%s", log_data); + syslog(LOG_INFO, "%s", log_data); #else printf("%s %s: %s\n", time_str, _process_name, log_data); #endif diff --git a/guest-client/guest-client-3.0.1/guest_client/src/heartbeat/guest_heartbeat_enabled_state.c b/guest-client/guest-client-3.0.1/guest_client/src/heartbeat/guest_heartbeat_enabled_state.c index 03cdd99c..609cebcb 100755 --- a/guest-client/guest-client-3.0.1/guest_client/src/heartbeat/guest_heartbeat_enabled_state.c +++ b/guest-client/guest-client-3.0.1/guest_client/src/heartbeat/guest_heartbeat_enabled_state.c @@ -100,7 +100,7 @@ static bool guest_heartbeat_enabled_state_health_check( if (GUEST_OKAY != error) { DPRINTFE("Failed to invoke health script %s.", - config->event_handling_script); + config->health_check_script); return true; // rearm } } diff --git a/guest-client/guest-client-3.0.1/guest_client_api/guest_api_debug.c b/guest-client/guest-client-3.0.1/guest_client_api/guest_api_debug.c index cadd2025..dac09405 100755 --- a/guest-client/guest-client-3.0.1/guest_client_api/guest_api_debug.c +++ b/guest-client/guest-client-3.0.1/guest_client_api/guest_api_debug.c @@ -106,7 +106,7 @@ void guest_api_debug_log( const char* format, ... ) } #ifdef GUEST_DEBUG_WANT_SYSLOG - syslog(LOG_DEBUG, "%s", log_data); + syslog(LOG_INFO, "%s", log_data); #else printf("%s %s: %s\n", time_str, _process_name, log_data); #endif