mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-26 14:10:05 +00:00
Save the log file in the user directory
This commit is contained in:
parent
747ff1f65e
commit
26f8f4edb7
@ -8,6 +8,7 @@
|
|||||||
#include <spdlog/spdlog.h>
|
#include <spdlog/spdlog.h>
|
||||||
|
|
||||||
#include "common/assert.h"
|
#include "common/assert.h"
|
||||||
|
#include "common/file_util.h"
|
||||||
#include "common/logging/backend.h"
|
#include "common/logging/backend.h"
|
||||||
#include "common/logging/backend_spdlog.h"
|
#include "common/logging/backend_spdlog.h"
|
||||||
#include "common/logging/filter.h"
|
#include "common/logging/filter.h"
|
||||||
@ -66,7 +67,8 @@ SpdLogBackend::SpdLogBackend() {
|
|||||||
|
|
||||||
// Define the sinks to be passed to the loggers
|
// Define the sinks to be passed to the loggers
|
||||||
// true means truncate file
|
// true means truncate file
|
||||||
auto file_sink = std::make_shared<spdlog::sinks::simple_file_sink_mt>("citra_log.txt", true);
|
auto file_sink = std::make_shared<spdlog::sinks::simple_file_sink_mt>(
|
||||||
|
FileUtil::GetUserPath(D_USER_IDX) + "citra_log.txt", true);
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
auto color_sink = std::make_shared<spdlog::sinks::wincolor_stderr_sink_mt>();
|
auto color_sink = std::make_shared<spdlog::sinks::wincolor_stderr_sink_mt>();
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user