refactor: extract logger to separate module
This commit is contained in:
parent
2341be0c70
commit
d8f656d98b
7 changed files with 9 additions and 11 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
add_subdirectory(./logger)
|
||||||
|
|
||||||
add_subdirectory(./asset_baker)
|
add_subdirectory(./asset_baker)
|
||||||
add_subdirectory(./asset_parser)
|
add_subdirectory(./asset_parser)
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,6 @@ if(NOT WIN32)
|
||||||
core/uuid.cpp
|
core/uuid.cpp
|
||||||
debug/exceptions.cpp
|
debug/exceptions.cpp
|
||||||
debug/instrumentor.cpp
|
debug/instrumentor.cpp
|
||||||
debug/logger.cpp
|
|
||||||
graphics/blender.cpp
|
graphics/blender.cpp
|
||||||
graphics/buffers.cpp
|
graphics/buffers.cpp
|
||||||
graphics/framebuffer.cpp
|
graphics/framebuffer.cpp
|
||||||
|
@ -53,7 +52,6 @@ else()
|
||||||
core/uuid.cpp
|
core/uuid.cpp
|
||||||
debug/exceptions.cpp
|
debug/exceptions.cpp
|
||||||
debug/instrumentor.cpp
|
debug/instrumentor.cpp
|
||||||
debug/logger.cpp
|
|
||||||
graphics/blender.cpp
|
graphics/blender.cpp
|
||||||
graphics/buffers.cpp
|
graphics/buffers.cpp
|
||||||
graphics/framebuffer.cpp
|
graphics/framebuffer.cpp
|
||||||
|
@ -102,9 +100,9 @@ endif()
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
engine
|
engine
|
||||||
PUBLIC glad
|
PUBLIC glad
|
||||||
|
PUBLIC logger
|
||||||
PUBLIC opengl::opengl
|
PUBLIC opengl::opengl
|
||||||
PUBLIC glfw
|
PUBLIC glfw
|
||||||
PUBLIC spdlog::spdlog
|
|
||||||
PUBLIC imgui
|
PUBLIC imgui
|
||||||
PUBLIC stb::stb
|
PUBLIC stb::stb
|
||||||
PUBLIC yaml-cpp::yaml-cpp
|
PUBLIC yaml-cpp::yaml-cpp
|
||||||
|
|
|
@ -122,7 +122,7 @@ constexpr auto bit(auto x)
|
||||||
|
|
||||||
/* debug */
|
/* debug */
|
||||||
#ifndef LIGHT_LOGGER_H
|
#ifndef LIGHT_LOGGER_H
|
||||||
#include <engine/debug/logger.hpp>
|
#include <logger/logger.hpp>
|
||||||
#endif
|
#endif
|
||||||
#include <engine/debug/exceptions.hpp>
|
#include <engine/debug/exceptions.hpp>
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include <engine/camera/camera.hpp>
|
#include <engine/camera/camera.hpp>
|
||||||
|
|
||||||
// debug
|
// debug
|
||||||
#include <engine/debug/logger.hpp>
|
#include <logger/logger.hpp>
|
||||||
|
|
||||||
// events
|
// events
|
||||||
#include <engine/events/char.hpp>
|
#include <engine/events/char.hpp>
|
||||||
|
|
2
modules/logger/CMakeLists.txt
Normal file
2
modules/logger/CMakeLists.txt
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
add_library_module(logger logger.cpp)
|
||||||
|
target_link_libraries(logger PUBLIC spdlog::spdlog)
|
|
@ -1,6 +1,5 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <any>
|
|
||||||
#include <format>
|
#include <format>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <spdlog/sinks/basic_file_sink.h>
|
#include <spdlog/sinks/basic_file_sink.h>
|
|
@ -1,7 +1,4 @@
|
||||||
#include <engine/debug/logger.hpp>
|
#include <logger/logger.hpp>
|
||||||
#include <spdlog/sinks/basic_file_sink.h>
|
|
||||||
#include <spdlog/sinks/stdout_color_sinks.h>
|
|
||||||
#include <spdlog/spdlog.h>
|
|
||||||
|
|
||||||
Logger::Logger(): spd_logger(spdlog::stdout_color_mt("Logger"))
|
Logger::Logger(): spd_logger(spdlog::stdout_color_mt("Logger"))
|
||||||
{
|
{
|
Loading…
Add table
Reference in a new issue