Air-Trap 1.0.0
A multiplayer R-Type clone game engine built with C++23 and ECS architecture
Loading...
Searching...
No Matches
Logger.hpp File Reference

Logger declaration with support for multiple log levels. More...

#include "RType/LogLevel.hpp"
#include "RType/Error.hpp"
#include <expected>
#include <format>
#include <source_location>
#include <string>
#include <string_view>
#include <type_traits>
#include <utility>
#include "Logger.tpp"
Include dependency graph for Logger.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  rtp::log::LogFmt< Args >
 

Namespaces

namespace  rtp
 
namespace  rtp::log
 
namespace  rtp::log::detail
 

Functions

auto rtp::log::configure (std::string_view logFilePath) noexcept -> std::expected< void, rtp::Error >
 Configure the logger using a configuration file.
 
template<typename... Args>
void rtp::log::debug (LogFmt< std::type_identity_t< Args >... > fmt, Args &&...args) noexcept
 Log a debug message.
 
template<typename... Args>
void rtp::log::info (LogFmt< std::type_identity_t< Args >... > fmt, Args &&...args) noexcept
 Log an informational message.
 
template<typename... Args>
void rtp::log::error (LogFmt< std::type_identity_t< Args >... > fmt, Args &&...args) noexcept
 Log an error message.
 
template<typename... Args>
void rtp::log::warning (LogFmt< std::type_identity_t< Args >... > fmt, Args &&...args) noexcept
 Log a warning message.
 
template<typename... Args>
void rtp::log::fatal (LogFmt< std::type_identity_t< Args >... > fmt, Args &&...args) noexcept
 Log a fatal error message.
 
void rtp::log::detail::logImpl (Level level, std::string_view message, const std::source_location &loc)
 

Detailed Description

Logger declaration with support for multiple log levels.

Author
Robin Toillon

Provides a thread-safe logging system with formatted output, automatic source location tracking, and configurable output to both console and file.

Definition in file Logger.hpp.