/* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ #pragma once #define SPDLOG_DEBUG_ON #define SPDLOG_TRACE_ON #include namespace openVulkanoCpp { class Logger { //TODO add custom sink for in game/engine console static std::vector SINKS; static std::vector> LOGGERS; public: static std::shared_ptr WINDOW; static std::shared_ptr MANAGER; static std::shared_ptr RENDER; static std::shared_ptr PHYSIC; static std::shared_ptr AUDIO; static std::shared_ptr DATA; static std::shared_ptr SCENE; static std::shared_ptr INPUT; static void SetupLogger(const std::string& logFolder = "logs", const std::string& logFile = "openVulkano.log"); /** * \brief Creates a new custom logger that writes to the main log file. * \param name The name of the logger * \param reg If set to true the logger can be accessed again with Logger::GetLogger(name) * \return The created logger */ static std::shared_ptr CreateLogger(const std::string& name, bool reg = true); static std::shared_ptr GetLogger(const std::string& name); static void RegisterSink(const spdlog::sink_ptr& newSink); }; }