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

Namespaces

namespace  debug_layer
 
namespace  engine
 
namespace  vulkan
 

Classes

class  CategoryConsoleSink
 
struct  CategoryInfo
 
class  ImguiSink
 
struct  LogEntry
 

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 , GENERAL = 7
}
 

Functions

SD_EXPORT std::deque< LogEntryget_log_history ()
 
SD_EXPORT void add_log_entry (LogEntry entry)
 
SD_EXPORT void clear_history ()
 
SD_EXPORT size_t get_total_entry_count ()
 
SD_EXPORT std::vector< LogEntryget_entries (size_t offset, size_t count)
 
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 ()
 
quill::LogLevel to_quill_level (LogLevel level)
 
LogLevel from_quill_level (quill::LogLevel level)
 
quill::Logger * get_category_logger_or_report (const char *categoryPath)
 
void write_entry_to_file (const LogEntry &entry)
 
std::vector< LogEntryread_entries_from_file (size_t offset, size_t count)
 
float get_uptime_sec ()
 
std::string ansi_fg_color (ImVec4 c)
 
std::string level_ansi_color (quill::LogLevel level)
 
const charlevel_str (quill::LogLevel level)
 
void create_category_logger (const char *name, LogLevel minLevel)
 

Variables

FILE_INTERNAL_BEGIN constexpr const charHISTORY_FILE = "debug_history.log"
 
constexpr size_t MAX_MEM_ENTRIES = 500
 
std::deque< LogEntryg_log_history
 
size_t g_file_entry_count = 0
 
std::mutex g_log_mutex
 
FILE_INTERNAL_BEGIN std::vector< CategoryInfog_category_registry
 
std::mutex g_registry_mutex
 
FILE_INTERNAL_BEGIN std::chrono::steady_clock::time_point s_start_time
 
FILE_INTERNAL_BEGIN std::shared_ptr< quill::Sink > g_console_sink
 
std::shared_ptr< quill::Sink > g_imgui_sink
 
std::shared_ptr< quill::Sink > g_engine_file_sink
 
std::shared_ptr< quill::Sink > g_game_file_sink
 
std::shared_ptr< quill::Sink > g_profiler_file_sink
 

Enumeration Type Documentation

◆ LogLevel

Enumerator
TRACE 
DEBUG 
INFO 
WARN 
ERROR 
CRITICAL 
OFF 
GENERAL 

Function Documentation

◆ add_log_entry()

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

◆ ansi_fg_color()

std::string sd::log::ansi_fg_color ( ImVec4  c)

◆ clear_history()

void sd::log::clear_history ( )

◆ create_category_logger()

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

◆ from_quill_level()

LogLevel sd::log::from_quill_level ( quill::LogLevel  level)

◆ get_category_logger_or_report()

SD_EXPORT quill::Logger * sd::log::get_category_logger_or_report ( const char categoryPath)

◆ get_category_registry()

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

◆ get_entries()

std::vector< LogEntry > sd::log::get_entries ( size_t  offset,
size_t  count 
)

◆ get_log_history()

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

◆ get_total_entry_count()

size_t sd::log::get_total_entry_count ( )

◆ get_uptime_sec()

float sd::log::get_uptime_sec ( )

◆ init()

void sd::log::init ( )

◆ is_category_under()

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

◆ level_ansi_color()

std::string sd::log::level_ansi_color ( quill::LogLevel  level)

◆ level_str()

const char * sd::log::level_str ( quill::LogLevel  level)

◆ read_entries_from_file()

std::vector< LogEntry > sd::log::read_entries_from_file ( size_t  offset,
size_t  count 
)

◆ register_category()

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

◆ to_quill_level()

quill::LogLevel sd::log::to_quill_level ( LogLevel  level)

◆ write_entry_to_file()

void sd::log::write_entry_to_file ( const LogEntry entry)

Variable Documentation

◆ g_category_registry

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

◆ g_console_sink

FILE_INTERNAL_BEGIN std::shared_ptr<quill::Sink> sd::log::g_console_sink

◆ g_engine_file_sink

std::shared_ptr<quill::Sink> sd::log::g_engine_file_sink

◆ g_file_entry_count

size_t sd::log::g_file_entry_count = 0

◆ g_game_file_sink

std::shared_ptr<quill::Sink> sd::log::g_game_file_sink

◆ g_imgui_sink

std::shared_ptr<quill::Sink> sd::log::g_imgui_sink

◆ g_log_history

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

◆ g_log_mutex

std::mutex sd::log::g_log_mutex

◆ g_profiler_file_sink

std::shared_ptr<quill::Sink> sd::log::g_profiler_file_sink

◆ g_registry_mutex

std::mutex sd::log::g_registry_mutex

◆ HISTORY_FILE

FILE_INTERNAL_BEGIN constexpr const char* sd::log::HISTORY_FILE = "debug_history.log"
constexpr

◆ MAX_MEM_ENTRIES

constexpr size_t sd::log::MAX_MEM_ENTRIES = 500
constexpr

◆ s_start_time

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