We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent adb014e commit 62f8dd4Copy full SHA for 62f8dd4
components/utilities/log_router/log_router.c
@@ -286,11 +286,13 @@ static void esp_log_router_shutdown(void)
286
287
esp_err_t esp_log_router_to_file(const char* file_path, const char* tag, esp_log_level_t level)
288
{
289
- // Create mutex for thread safety
290
- g_log_router_mutex = xSemaphoreCreateMutex();
+ // Create mutex for thread safety, the first time we ran
291
if (g_log_router_mutex == NULL) {
292
- ESP_LOGW(TAG, "Failed to create mutex for log router");
293
- return ESP_ERR_NO_MEM;
+ g_log_router_mutex = xSemaphoreCreateMutex();
+ if (g_log_router_mutex == NULL) {
+ ESP_LOGE(TAG, "Failed to create mutex for log router");
294
+ return ESP_ERR_NO_MEM;
295
+ }
296
}
297
298
if (!file_path) {
0 commit comments