diff --git a/port/freertos/golioth_sys_freertos.c b/port/freertos/golioth_sys_freertos.c index 4831c25d4..62ef0ae47 100644 --- a/port/freertos/golioth_sys_freertos.c +++ b/port/freertos/golioth_sys_freertos.c @@ -169,6 +169,13 @@ void golioth_sys_thread_destroy(golioth_sys_thread_t thread) * Misc *------------------------------------------------*/ -void golioth_sys_client_connected(void *client) {} +void golioth_sys_client_connected(void *client) { + if (CONFIG_GOLIOTH_AUTO_LOG_TO_CLOUD != 0) + { + golioth_debug_set_cloud_log_enabled(true); + } +} -void golioth_sys_client_disconnected(void *client) {} +void golioth_sys_client_disconnected(void* client) { + golioth_debug_set_cloud_log_enabled(false); +}