From 870323080ace623332947763bef7a038641b29eb Mon Sep 17 00:00:00 2001 From: anulax1225 Date: Sat, 23 Mar 2024 01:19:53 +0100 Subject: [PATCH] Fixed Index Out of bound error --- src/bakatools/logging/log.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/bakatools/logging/log.cpp b/src/bakatools/logging/log.cpp index c991c9c..10ad424 100644 --- a/src/bakatools/logging/log.cpp +++ b/src/bakatools/logging/log.cpp @@ -9,10 +9,12 @@ namespace Bk { { std::vector log_sinks; log_sinks.emplace_back(std::make_shared()); - if (file_log) log_sinks.emplace_back(std::make_shared("bakara.log", true)); - log_sinks[0]->set_pattern("%^[%T] %n: %v%$"); - log_sinks[1]->set_pattern("[%T] [%l] %n: %v"); + if (file_log) + { + log_sinks.emplace_back(std::make_shared("bakara.log", true)); + log_sinks[1]->set_pattern("[%T] [%l] %n: %v"); + } p_core_logger = std::make_shared(core, begin(log_sinks), end(log_sinks)); spdlog::register_logger(p_core_logger);