Calamity Engine 1.0.0
A cross-platform 2D game engine written in C++ and SDL3.
Loading...
Searching...
No Matches
Logger Class Reference

#include <logger.hpp>

Static Public Member Functions

static void init (const std::string &name="Calamity")
 
static void exit ()
 
template<typename... Args>
static void info (fmt::format_string< Args... > fmt, Args &&...args)
 
template<typename... Args>
static void warn (fmt::format_string< Args... > fmt, Args &&...args)
 
template<typename... Args>
static void error (fmt::format_string< Args... > fmt, Args &&...args)
 
template<typename... Args>
static void debug (fmt::format_string< Args... > fmt, Args &&...args)
 

Detailed Description

Logger

The logger class is a static wrapper around spdlog.

Example usage:

Logger::info("this is an info log");
Logger::warn("this is a warning");
Logger::error("this is an error!");
Logger::info("Here is a float: {}", 20.0f);
Logger::warning("Here are two floats: {}... and {}!", 20.0f, 10.0f);
static void warn(fmt::format_string< Args... > fmt, Args &&...args)
Definition logger.hpp:33
static void info(fmt::format_string< Args... > fmt, Args &&...args)
Definition logger.hpp:28
static void error(fmt::format_string< Args... > fmt, Args &&...args)
Definition logger.hpp:38

Member Function Documentation

◆ debug()

template<typename... Args>
static void Logger::debug ( fmt::format_string< Args... >  fmt,
Args &&...  args 
)
inlinestatic

◆ error()

template<typename... Args>
static void Logger::error ( fmt::format_string< Args... >  fmt,
Args &&...  args 
)
inlinestatic

◆ exit()

void Logger::exit ( )
static

◆ info()

template<typename... Args>
static void Logger::info ( fmt::format_string< Args... >  fmt,
Args &&...  args 
)
inlinestatic

◆ init()

void Logger::init ( const std::string &  name = "Calamity")
static

◆ warn()

template<typename... Args>
static void Logger::warn ( fmt::format_string< Args... >  fmt,
Args &&...  args 
)
inlinestatic

The documentation for this class was generated from the following files: