From 2d9f3d5bfe16277bdd4dd9b88f367ba89da913eb Mon Sep 17 00:00:00 2001 From: bogdan Date: Mon, 8 May 2023 10:31:22 +0200 Subject: [PATCH] added logging to file in cron application --- components/webguiapp | 2 +- main/src/CronTimers.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/components/webguiapp b/components/webguiapp index 832bd3e..918ac98 160000 --- a/components/webguiapp +++ b/components/webguiapp @@ -1 +1 @@ -Subproject commit 832bd3e6236fc7eb9fe3a02b2625bd4dee0c2444 +Subproject commit 918ac98b3589a8462553cbe70d89e8adf744a24b diff --git a/main/src/CronTimers.c b/main/src/CronTimers.c index f0db2d2..090ff26 100644 --- a/main/src/CronTimers.c +++ b/main/src/CronTimers.c @@ -22,6 +22,7 @@ #include "CronTimers.h" #include "AppConfiguration.h" #include "esp_log.h" +#include "webguiapp.h" #define TAG "CRON_TIMER" @@ -57,6 +58,7 @@ void custom_cron_job_callback(cron_job *job) time_t now; time(&now); ESP_LOGI(TAG, "Execute scheduler '%s' action %d under object %d at time %d", name, act, obj, (unsigned int )now); + LogFile("cron.log", "executed sheduler"); custom_cron_execute(obj, act); return; } @@ -121,6 +123,7 @@ void TimeObtainHandler(struct timeval *tm) ESP_LOGW(TAG, "Current time received with value %d", (unsigned int )tm->tv_sec); ReloadCronSheduler(); ExecuteLastAction(); + LogFile("cron.log", "Cron service started"); } void DebugTimer()