Replaced Logger usage with LOG_x (#548)

This commit is contained in:
Ken Van Hoeylandt
2026-07-04 23:49:19 +02:00
committed by GitHub
parent ecad2248d9
commit 9d5993930d
162 changed files with 1776 additions and 1842 deletions
+8 -8
View File
@@ -1,16 +1,16 @@
#ifdef ESP_PLATFORM
#include <Tactility/PartitionsEsp.h>
#include <Tactility/Logger.h>
#include <esp_vfs_fat.h>
#include <nvs_flash.h>
#include <tactility/error.h>
#include <tactility/filesystem/file_system.h>
#include <tactility/log.h>
namespace tt {
static const auto LOGGER = Logger("Partitions");
constexpr auto* TAG = "Partitions";
// region file_system stub
@@ -47,7 +47,7 @@ FileSystemApi partition_fs_api = {
// endregion file_system stub
static esp_err_t initNvsFlashSafely() {
LOGGER.info("Init NVS");
LOG_I(TAG, "Init NVS");
esp_err_t result = nvs_flash_init();
if (result == ESP_ERR_NVS_NO_FREE_PAGES || result == ESP_ERR_NVS_NEW_VERSION_FOUND) {
ESP_ERROR_CHECK(nvs_flash_erase());
@@ -77,7 +77,7 @@ size_t getSectorSize() {
}
bool initPartitionsEsp() {
LOGGER.info("Init partitions");
LOG_I(TAG, "Init partitions");
ESP_ERROR_CHECK(initNvsFlashSafely());
const esp_vfs_fat_mount_config_t mount_config = {
@@ -90,21 +90,21 @@ bool initPartitionsEsp() {
auto system_result = esp_vfs_fat_spiflash_mount_ro("/system", "system", &mount_config);
if (system_result != ESP_OK) {
LOGGER.error("Failed to mount /system ({})", esp_err_to_name(system_result));
LOG_E(TAG, "Failed to mount /system (%s)", esp_err_to_name(system_result));
return false;
}
LOGGER.info("Mounted /system");
LOG_I(TAG, "Mounted /system");
static auto system_fs_data = PartitionFsData("/system");
file_system_add(&partition_fs_api, &system_fs_data);
#ifdef CONFIG_TT_USER_DATA_LOCATION_INTERNAL
auto data_result = esp_vfs_fat_spiflash_mount_rw_wl("/data", "data", &mount_config, &data_wl_handle);
if (data_result != ESP_OK) {
LOGGER.error("Failed to mount /data ({})", esp_err_to_name(data_result));
LOG_E(TAG, "Failed to mount /data (%s)", esp_err_to_name(data_result));
return false;
}
LOGGER.info("Mounted /data");
LOG_I(TAG, "Mounted /data");
static auto data_fs_data = PartitionFsData("/data");
file_system_add(&partition_fs_api, &data_fs_data);
#endif