Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
LogCategory.h File Reference
#include <atomic>
#include <mutex>
#include <string>
#include <unordered_map>
#include <vector>
Include dependency graph for LogCategory.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  EngineCore::LogCategory
 Represents a single log category with verbosity control. More...
class  EngineCore::LogCategoryManager
 Global registry for log categories with runtime verbosity control. More...

Namespaces

namespace  EngineCore
 Log category system implementation.

Macros

#define DECLARE_LOG_CATEGORY_EXTERN(CategoryName, DefaultVerbosity, CompileTimeVerbosity)
 Declare a log category for use across multiple files (header)
#define DEFINE_LOG_CATEGORY(CategoryName, DefaultVerbosity, CompileTimeVerbosity)
 Define a log category (source file, pairs with DECLARE_LOG_CATEGORY_EXTERN)
#define DEFINE_LOG_CATEGORY_STATIC(CategoryName, DefaultVerbosity, CompileTimeVerbosity)
 Define a log category for use in a single file only (no header declaration needed)

Enumerations

enum class  EngineCore::LogVerbosity : uint8_t {
  EngineCore::Fatal = 0 ,
  EngineCore::Error = 1 ,
  EngineCore::Warning = 2 ,
  EngineCore::Info = 3 ,
  EngineCore::Debug = 4 ,
  EngineCore::Verbose = 5 ,
  EngineCore::All = Verbose ,
  EngineCore::Off = Fatal
}
 Log verbosity levels, ordered from most to least severe. More...

Functions

constexpr const char * EngineCore::verbosityToString (LogVerbosity v)
 Convert verbosity enum to string for display/config.
LogVerbosity EngineCore::verbosityFromString (const std::string &str)
 Parse verbosity from string (case-insensitive)
constexpr int EngineCore::verbosityToPlogSeverity (LogVerbosity v)
 Convert LogVerbosity to plog::Severity.

Macro Definition Documentation

◆ DECLARE_LOG_CATEGORY_EXTERN

#define DECLARE_LOG_CATEGORY_EXTERN ( CategoryName,
DefaultVerbosity,
CompileTimeVerbosity )
Value:
extern ::EngineCore::LogCategory CategoryName;

Declare a log category for use across multiple files (header)

Parameters
CategoryNameThe category identifier (e.g., LogLOD)
DefaultVerbosityInitial runtime verbosity level
CompileTimeVerbosityMessages below this are compiled out

Example: DECLARE_LOG_CATEGORY_EXTERN(LogLOD, Info, Verbose);

Definition at line 207 of file LogCategory.h.

◆ DEFINE_LOG_CATEGORY

#define DEFINE_LOG_CATEGORY ( CategoryName,
DefaultVerbosity,
CompileTimeVerbosity )
Value:
::EngineCore::LogCategory CategoryName(#CategoryName, \
::EngineCore::LogVerbosity::DefaultVerbosity, \
::EngineCore::LogVerbosity::CompileTimeVerbosity);
Represents a single log category with verbosity control.
Definition LogCategory.h:89

Define a log category (source file, pairs with DECLARE_LOG_CATEGORY_EXTERN)

Must specify the same verbosity levels as the declaration.

Example: // In header: DECLARE_LOG_CATEGORY_EXTERN(LogLOD, Info, Verbose); // In source: DEFINE_LOG_CATEGORY(LogLOD, Info, Verbose);

Definition at line 219 of file LogCategory.h.

◆ DEFINE_LOG_CATEGORY_STATIC

#define DEFINE_LOG_CATEGORY_STATIC ( CategoryName,
DefaultVerbosity,
CompileTimeVerbosity )
Value:
static ::EngineCore::LogCategory CategoryName##_Instance(#CategoryName, \
::EngineCore::LogVerbosity::DefaultVerbosity, \
::EngineCore::LogVerbosity::CompileTimeVerbosity); \
static ::EngineCore::LogCategory& CategoryName = CategoryName##_Instance;

Define a log category for use in a single file only (no header declaration needed)

Parameters
CategoryNameThe category identifier
DefaultVerbosityInitial runtime verbosity level
CompileTimeVerbosityMessages below this are compiled out

Example: DEFINE_LOG_CATEGORY_STATIC(LogMyLocalSystem, Info, Verbose);

Definition at line 234 of file LogCategory.h.