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 -7
View File
@@ -8,11 +8,12 @@
#include <Tactility/file/File.h>
#include <lvgl.h>
#include <tactility/log.h>
#include <tactility/lvgl_icon_shared.h>
namespace tt::app::notes {
static const auto LOGGER = Logger("Notes");
constexpr auto* TAG = "Notes";
constexpr auto* NOTES_FILE_ARGUMENT = "file";
class NotesApp final : public App {
@@ -52,11 +53,11 @@ class NotesApp final : public App {
saveBuffer = lv_textarea_get_text(uiNoteText);
lvgl::getSyncLock()->unlock();
saveFileLaunchId = fileselection::startForExistingOrNewFile();
LOGGER.info("launched with id {}", saveFileLaunchId);
LOG_I(TAG, "launched with id %u", saveFileLaunchId);
break;
case 3: // Load
loadFileLaunchId = fileselection::startForExistingFile();
LOGGER.info("launched with id {}", loadFileLaunchId);
LOG_I(TAG, "launched with id %u", loadFileLaunchId);
break;
}
} else {
@@ -64,7 +65,7 @@ class NotesApp final : public App {
if (obj == cont) return;
if (lv_obj_get_child(cont, 1)) {
saveFileLaunchId = fileselection::startForExistingOrNewFile();
LOGGER.info("launched with id {}", saveFileLaunchId);
LOG_I(TAG, "launched with id %u", saveFileLaunchId);
} else { //Reset
resetFileContent();
}
@@ -91,7 +92,7 @@ class NotesApp final : public App {
lv_textarea_set_text(uiNoteText, reinterpret_cast<const char*>(data.get()));
lv_label_set_text(uiCurrentFileName, path.c_str());
filePath = path;
LOGGER.info("Loaded from {}", path);
LOG_I(TAG, "Loaded from %s", path.c_str());
}
});
}
@@ -101,7 +102,7 @@ class NotesApp final : public App {
bool result = false;
file::getLock(path)->withLock([&result, this, path] {
if (file::writeString(path, saveBuffer.c_str())) {
LOGGER.info("Saved to {}", path);
LOG_I(TAG, "Saved to %s", path.c_str());
filePath = path;
result = true;
}
@@ -193,7 +194,7 @@ class NotesApp final : public App {
}
void onResult(AppContext& appContext, LaunchId launchId, Result result, std::unique_ptr<Bundle> resultData) override {
LOGGER.info("Result for launch id {}", launchId);
LOG_I(TAG, "Result for launch id %u", launchId);
if (launchId == loadFileLaunchId) {
loadFileLaunchId = 0;
if (result == Result::Ok && resultData != nullptr) {