sys: Log to a file when ImHex wasn't opened though a terminal

This commit is contained in:
WerWolv
2022-01-17 20:06:00 +01:00
parent 2df4e22bf8
commit 8701e0f402
15 changed files with 155 additions and 42 deletions

View File

@@ -3,13 +3,18 @@
#if defined(OS_LINUX)
#include <hex/helpers/utils.hpp>
#include <hex/helpers/logger.hpp>
#include <nlohmann/json.hpp>
#include <sys/wait.h>
#include <unistd.h>
namespace hex {
void Window::initNative() {
if (!isatty(STDOUT_FILENO)) {
log::redirectToFile();
}
}
void Window::setupNativeWindow() {