SDEngine
Game Engine
Loading...
Searching...
No Matches
sd::log Namespace Reference

Namespaces

namespace  engine
 
namespace  game
 

Classes

struct  CategoryInfo
 
class  imgui_sink
 
struct  LogEntry
 

Typedefs

using ImguiSinkMt = imgui_sink< std::mutex >
 

Enumerations

enum class  LogLevel {
  TRACE = ENGINE_LOG_LEVEL_TRACE , DEBUG = ENGINE_LOG_LEVEL_DEBUG , INFO = ENGINE_LOG_LEVEL_INFO , WARN = ENGINE_LOG_LEVEL_WARN ,
  ERROR = ENGINE_LOG_LEVEL_ERROR , CRITICAL = ENGINE_LOG_LEVEL_CRITICAL , OFF = ENGINE_LOG_LEVEL_OFF
}
 

Functions

SD_EXPORT std::deque< LogEntryget_log_history ()
 
SD_EXPORT void add_log_entry (LogEntry entry)
 
SD_EXPORT std::vector< CategoryInfo > & get_category_registry ()
 
SD_EXPORT void register_category (const char *name, ImVec4 color)
 
bool is_category_under (const std::string &child, const std::string &parent)
 
SD_EXPORT void init ()
 Initializes all category loggers, shared sinks, and the ImGui sink.
 
spdlog::level::level_enum to_spdlog_level (LogLevel level)
 
LogLevel from_spdlog_level (spdlog::level::level_enum level)
 
std::shared_ptr< spdlog::logger > get_category_logger_or_report (const char *categoryPath)
 
static float get_uptime_sec ()
 
static void create_category_logger (const char *name, const LogLevel minLevel)
 

Variables

static std::deque< LogEntryg_log_history
 
static std::mutex g_log_mutex
 
static std::vector< CategoryInfog_category_registry
 
static std::vector< spdlog::sink_ptr > g_shared_sinks
 
static spdlog::sink_ptr g_engine_file_sink
 
static spdlog::sink_ptr g_game_file_sink
 
static std::chrono::steady_clock::time_point s_start_time
 

Typedef Documentation

◆ ImguiSinkMt

Enumeration Type Documentation

◆ LogLevel

Enumerator
TRACE 
DEBUG 
INFO 
WARN 
ERROR 
CRITICAL 
OFF 

Function Documentation

◆ add_log_entry()

void sd::log::add_log_entry ( LogEntry  entry)

◆ create_category_logger()

static void sd::log::create_category_logger ( const char name,
const LogLevel  minLevel 
)
static

◆ from_spdlog_level()

LogLevel sd::log::from_spdlog_level ( spdlog::level::level_enum  level)

◆ get_category_logger_or_report()

std::shared_ptr< spdlog::logger > sd::log::get_category_logger_or_report ( const char categoryPath)
inline

◆ get_category_registry()

std::vector< CategoryInfo > & sd::log::get_category_registry ( )

◆ get_log_history()

std::deque< LogEntry > sd::log::get_log_history ( )

◆ get_uptime_sec()

static float sd::log::get_uptime_sec ( )
static

◆ init()

void sd::log::init ( )

Initializes all category loggers, shared sinks, and the ImGui sink.

◆ is_category_under()

bool sd::log::is_category_under ( const std::string &  child,
const std::string &  parent 
)

◆ register_category()

void sd::log::register_category ( const char name,
ImVec4  color 
)

◆ to_spdlog_level()

spdlog::level::level_enum sd::log::to_spdlog_level ( LogLevel  level)

Variable Documentation

◆ g_category_registry

std::vector<CategoryInfo> sd::log::g_category_registry
static

◆ g_engine_file_sink

spdlog::sink_ptr sd::log::g_engine_file_sink
static

◆ g_game_file_sink

spdlog::sink_ptr sd::log::g_game_file_sink
static

◆ g_log_history

std::deque<LogEntry> sd::log::g_log_history
static

◆ g_log_mutex

std::mutex sd::log::g_log_mutex
static

◆ g_shared_sinks

std::vector<spdlog::sink_ptr> sd::log::g_shared_sinks
static

◆ s_start_time

std::chrono::steady_clock::time_point sd::log::s_start_time
static