6 #define SPDLOG_TRACE_ON 7 #define SPDLOG_DEBUG_ON 9 #include "spdlog/spdlog.h" 10 #include "spdlog/sinks/stdout_sinks.h" 11 #include "spdlog/sinks/basic_file_sink.h" 12 #include "spdlog/async.h" 13 #include "spdlog/sinks/stdout_color_sinks.h" 25 virtual void Init()
override;
52 #if defined( DEBUG ) || defined ( _DEBUG ) || defined ( F_ENABLE_LOGGING ) 54 #define F_LOG_TRACE( ... ) Logger::GetCurrentConsole()->info( __VA_ARGS__ ); Logger::GetCurrentLogFile()->info( __VA_ARGS__ ) 55 #define F_LOG_WARN( ... ) Logger::GetCurrentConsole()->warn( __VA_ARGS__ ); Logger::GetCurrentLogFile()->warn( __VA_ARGS__ ) 56 #define F_LOG_ERROR( ... ) Logger::GetCurrentConsole()->error( __VA_ARGS__ ); Logger::GetCurrentLogFile()->error( __VA_ARGS__ ); 60 #define F_LOG_FATAL( ... ) Logger::GetCurrentConsole()->error( __VA_ARGS__ ); \ 61 throw std::runtime_error( __VA_ARGS__ ) 65 #define F_LOG_TRACE( ... ) 66 #define F_LOG_WARN( ... ) 67 #define F_LOG_ERROR( ... ) 71 #define F_LOG_FATAL( ... ) Logger::GetCurrentConsole()->error( __VA_ARGS__ ); \ 72 throw std::runtime_error( __VA_ARGS__ ) static std::shared_ptr< spdlog::logger > m_Console
Pointer to the current console that is being used for logging.
Definition: Logger.h:42
static std::shared_ptr< spdlog::logger > GetCurrentLogFile()
Get the current async log file that is being written to.
Definition: Logger.cpp:42
virtual void Init() override
Definition: Logger.cpp:10
Class that can have only one instance.
Definition: Singleton.hpp:11
static std::shared_ptr< spdlog::logger > GetCurrentConsole()
Gets a reference to the current logging console
Definition: Logger.cpp:37
Singleton class that allows logging to the console as well as async to a file.
Definition: Logger.h:21
static std::shared_ptr< spdlog::logger > m_FileLog
Pointer to the log file logger.
Definition: Logger.h:45