mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-03 05:57:40 -05:00
sys: Replaced many helper functions with libwolv
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
#include <hex/helpers/logger.hpp>
|
||||
#include <hex/helpers/file.hpp>
|
||||
#include <hex/helpers/fs.hpp>
|
||||
#include <hex/helpers/fmt.hpp>
|
||||
|
||||
#include <iostream>
|
||||
#include <wolv/io/file.hpp>
|
||||
|
||||
namespace hex::log {
|
||||
|
||||
static fs::File g_loggerFile;
|
||||
static wolv::io::File g_loggerFile;
|
||||
|
||||
FILE *getDestination() {
|
||||
if (g_loggerFile.isValid())
|
||||
@@ -24,8 +23,8 @@ namespace hex::log {
|
||||
if (g_loggerFile.isValid()) return;
|
||||
|
||||
for (const auto &path : fs::getDefaultPaths(fs::ImHexPath::Logs, true)) {
|
||||
fs::createDirectories(path);
|
||||
g_loggerFile = fs::File(path / hex::format("{0:%Y%m%d_%H%M%S}.log", fmt::localtime(std::chrono::system_clock::now())), fs::File::Mode::Create);
|
||||
wolv::io::fs::createDirectories(path);
|
||||
g_loggerFile = wolv::io::File(path / hex::format("{0:%Y%m%d_%H%M%S}.log", fmt::localtime(std::chrono::system_clock::now())), wolv::io::File::Mode::Create);
|
||||
g_loggerFile.disableBuffering();
|
||||
|
||||
if (g_loggerFile.isValid()) break;
|
||||
|
||||
Reference in New Issue
Block a user