Replaced Logger usage with LOG_x (#548)
This commit is contained in:
committed by
GitHub
parent
ecad2248d9
commit
9d5993930d
@@ -1,9 +1,9 @@
|
||||
#include <Tactility/app/selectiondialog/SelectionDialog.h>
|
||||
|
||||
#include <Tactility/Logger.h>
|
||||
#include <Tactility/lvgl/Toolbar.h>
|
||||
#include <Tactility/service/loader/Loader.h>
|
||||
#include <Tactility/StringUtils.h>
|
||||
#include <tactility/log.h>
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
@@ -16,7 +16,7 @@ constexpr auto* RESULT_BUNDLE_KEY_INDEX = "index";
|
||||
constexpr auto* PARAMETER_ITEM_CONCATENATION_TOKEN = ";;";
|
||||
constexpr auto* DEFAULT_TITLE = "Select...";
|
||||
|
||||
static const auto LOGGER = Logger("SelectionDialog");
|
||||
constexpr auto* TAG = "SelectionDialog";
|
||||
|
||||
extern const AppManifest manifest;
|
||||
|
||||
@@ -53,7 +53,7 @@ class SelectionDialogApp final : public App {
|
||||
|
||||
void onListItemSelected(lv_event_t* e) {
|
||||
auto index = reinterpret_cast<std::size_t>(lv_event_get_user_data(e));
|
||||
LOGGER.info("Selected item at index {}", index);
|
||||
LOG_I(TAG, "Selected item at index %d", (int)index);
|
||||
auto bundle = std::make_unique<Bundle>();
|
||||
bundle->putInt32(RESULT_BUNDLE_KEY_INDEX, (int32_t)index);
|
||||
setResult(Result::Ok, std::move(bundle));
|
||||
@@ -85,7 +85,7 @@ public:
|
||||
if (parameters->optString(PARAMETER_BUNDLE_KEY_ITEMS, items_concatenated)) {
|
||||
std::vector<std::string> items = string::split(items_concatenated, PARAMETER_ITEM_CONCATENATION_TOKEN);
|
||||
if (items.empty() || items.front().empty()) {
|
||||
LOGGER.error("No items provided");
|
||||
LOG_E(TAG, "No items provided");
|
||||
setResult(Result::Error);
|
||||
stop(manifest.appId);
|
||||
} else if (items.size() == 1) {
|
||||
@@ -93,7 +93,7 @@ public:
|
||||
result_bundle->putInt32(RESULT_BUNDLE_KEY_INDEX, 0);
|
||||
setResult(Result::Ok, std::move(result_bundle));
|
||||
stop(manifest.appId);
|
||||
LOGGER.warn("Auto-selecting single item");
|
||||
LOG_W(TAG, "Auto-selecting single item");
|
||||
} else {
|
||||
size_t index = 0;
|
||||
for (const auto& item: items) {
|
||||
@@ -101,7 +101,7 @@ public:
|
||||
}
|
||||
}
|
||||
} else {
|
||||
LOGGER.error("No items provided");
|
||||
LOG_E(TAG, "No items provided");
|
||||
setResult(Result::Error);
|
||||
stop(manifest.appId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user