aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/qt_sdl/ArchiveUtil.cpp
diff options
context:
space:
mode:
authorJesse Talavera-Greenberg <jesse@jesse.tg>2023-03-23 13:04:38 -0400
committerGitHub <noreply@github.com>2023-03-23 18:04:38 +0100
commit79dfb8dc8f356834f0b6cf7baf73f77552b08923 (patch)
tree9a2a139617b8e178edd153ac68d56f2d0e48e3ed /src/frontend/qt_sdl/ArchiveUtil.cpp
parent19280cff2d3d618f032d0e6ef4b1d4414fa02f58 (diff)
Introduce `Platform::Log` (#1640)
* Add Platform::Log and Platform::LogLevel * Replace most printf calls with Platform::Log calls * Move a brace down * Move some log entries to one Log call - Some implementations of Log may assume a full line * Log the MAC address as LogLevel::Info
Diffstat (limited to 'src/frontend/qt_sdl/ArchiveUtil.cpp')
-rw-r--r--src/frontend/qt_sdl/ArchiveUtil.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/frontend/qt_sdl/ArchiveUtil.cpp b/src/frontend/qt_sdl/ArchiveUtil.cpp
index fff1a94..b025aa8 100644
--- a/src/frontend/qt_sdl/ArchiveUtil.cpp
+++ b/src/frontend/qt_sdl/ArchiveUtil.cpp
@@ -19,6 +19,9 @@
#include "ArchiveUtil.h"
#include "Platform.h"
+using Platform::Log;
+using Platform::LogLevel;
+
namespace Archive
{
@@ -106,7 +109,7 @@ QVector<QString> ExtractFileFromArchive(QString path, QString wantedFile, QByteA
if (bytesRead < 0)
{
- printf("Error whilst reading archive: %s", archive_error_string(a));
+ Log(LogLevel::Error, "Error whilst reading archive: %s", archive_error_string(a));
return QVector<QString> {"Err", archive_error_string(a)};
}