Skip to content

Commit

Permalink
fix: log directory creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Curve committed Nov 12, 2023
1 parent 9ad7e77 commit 843cf9b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.21)
project(venmic LANGUAGES CXX VERSION 2.1.1)
project(venmic LANGUAGES CXX VERSION 2.1.2)

# --------------------------------------------------------------------------------------------------------
# Library options
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"private": false,
"license": "MIT",
"author": "Curve (https://github.com/Curve)",
"version": "2.1.1",
"version": "2.1.2",
"main": "./lib/index.js",
"types": "./lib/module.d.ts",
"scripts": {
Expand Down
8 changes: 4 additions & 4 deletions src/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ namespace vencord
return;
}

auto log_file = log_directory() / "venmic.log";
auto directory = log_directory();

if (!fs::exists(log_file))
if (!fs::exists(directory))
{
[[maybe_unused]] std::error_code ec;
fs::create_directories(log_file.parent_path(), ec);
fs::create_directories(directory, ec);
}

auto file_sink = std::make_shared<sinks::basic_file_sink_mt>(log_file.string());
auto file_sink = std::make_shared<sinks::basic_file_sink_mt>((directory / "venmic.log").string());

file_sink->set_level(spdlog::level::trace);
m_impl->logger->sinks().emplace_back(file_sink);
Expand Down

0 comments on commit 843cf9b

Please sign in to comment.