VOX
A little voxel engine
Loading...
Searching...
No Matches
logger.hpp File Reference
#include "ft_format.hpp"
#include <iostream>
#include <fstream>
#include <sstream>
#include <ctime>
#include <iomanip>
#include <filesystem>
#include <memory>
#include <mutex>
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

class  FileOutput
 A class that represents a file used for output with RAII. More...
 
class  Logger
 A class for logging messages to the console and to files. More...
 

Macros

#define LOG_CRITICAL(...)   logger << Logger::Level::CRITICAL << __VA_ARGS__ << std::endl
 
#define LOG_ERROR(...)   logger << Logger::Level::ERROR << __VA_ARGS__ << std::endl
 
#define LOG_WARNING(...)   logger << Logger::Level::WARNING << __VA_ARGS__ << std::endl
 
#define LOG_INFO(...)   logger << Logger::Level::INFO << __VA_ARGS__ << std::endl
 
#define LOG_DEBUG(...)   logger << Logger::Level::DEBUG << __VA_ARGS__ << std::endl
 
#define LOG_TRACE(...)   logger << Logger::Level::TRACE << __VA_ARGS__ << std::endl
 
#define LOG_CRITICAL_FMT(fmt, ...)   logger << Logger::Level::CRITICAL << ft_format(fmt, __VA_ARGS__) << std::endl
 
#define LOG_ERROR_FMT(fmt, ...)   logger << Logger::Level::ERROR << ft_format(fmt, __VA_ARGS__) << std::endl
 
#define LOG_WARNING_FMT(fmt, ...)   logger << Logger::Level::WARNING << ft_format(fmt, __VA_ARGS__) << std::endl
 
#define LOG_INFO_FMT(fmt, ...)   logger << Logger::Level::INFO << ft_format(fmt, __VA_ARGS__) << std::endl
 
#define LOG_DEBUG_FMT(fmt, ...)   logger << Logger::Level::DEBUG << ft_format(fmt, __VA_ARGS__) << std::endl
 
#define LOG_TRACE_FMT(fmt, ...)   logger << Logger::Level::TRACE << ft_format(fmt, __VA_ARGS__) << std::endl
 

Variables

Logger logger
 

Macro Definition Documentation

◆ LOG_CRITICAL

#define LOG_CRITICAL (   ...)    logger << Logger::Level::CRITICAL << __VA_ARGS__ << std::endl

◆ LOG_CRITICAL_FMT

#define LOG_CRITICAL_FMT (   fmt,
  ... 
)    logger << Logger::Level::CRITICAL << ft_format(fmt, __VA_ARGS__) << std::endl

◆ LOG_DEBUG

#define LOG_DEBUG (   ...)    logger << Logger::Level::DEBUG << __VA_ARGS__ << std::endl

◆ LOG_DEBUG_FMT

#define LOG_DEBUG_FMT (   fmt,
  ... 
)    logger << Logger::Level::DEBUG << ft_format(fmt, __VA_ARGS__) << std::endl

◆ LOG_ERROR

#define LOG_ERROR (   ...)    logger << Logger::Level::ERROR << __VA_ARGS__ << std::endl

◆ LOG_ERROR_FMT

#define LOG_ERROR_FMT (   fmt,
  ... 
)    logger << Logger::Level::ERROR << ft_format(fmt, __VA_ARGS__) << std::endl

◆ LOG_INFO

#define LOG_INFO (   ...)    logger << Logger::Level::INFO << __VA_ARGS__ << std::endl

◆ LOG_INFO_FMT

#define LOG_INFO_FMT (   fmt,
  ... 
)    logger << Logger::Level::INFO << ft_format(fmt, __VA_ARGS__) << std::endl

◆ LOG_TRACE

#define LOG_TRACE (   ...)    logger << Logger::Level::TRACE << __VA_ARGS__ << std::endl

◆ LOG_TRACE_FMT

#define LOG_TRACE_FMT (   fmt,
  ... 
)    logger << Logger::Level::TRACE << ft_format(fmt, __VA_ARGS__) << std::endl

◆ LOG_WARNING

#define LOG_WARNING (   ...)    logger << Logger::Level::WARNING << __VA_ARGS__ << std::endl

◆ LOG_WARNING_FMT

#define LOG_WARNING_FMT (   fmt,
  ... 
)    logger << Logger::Level::WARNING << ft_format(fmt, __VA_ARGS__) << std::endl

Variable Documentation

◆ logger

Logger logger
extern