mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 05:27:41 -05:00
impr: Remove hex::format, improve format and logging type safety
This commit is contained in:
@@ -53,17 +53,17 @@ namespace hex::plugin::builtin {
|
||||
ImGui::TableHeadersRow();
|
||||
|
||||
const auto &logs = log::impl::getLogEntries();
|
||||
for (const auto &log : logs | std::views::reverse) {
|
||||
if (!shouldDisplay(log.level, m_logLevel)) {
|
||||
for (const auto &[project, level, message] : logs | std::views::reverse) {
|
||||
if (!shouldDisplay(level, m_logLevel)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextUnformatted(log.project.c_str());
|
||||
ImGui::TextUnformatted(project.begin(), project.end());
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, getColor(log.level).Value);
|
||||
ImGui::TextUnformatted(log.message.c_str());
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, getColor(level).Value);
|
||||
ImGui::TextUnformatted(message.c_str());
|
||||
ImGui::PopStyleColor();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user