Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
EngineCore::LogCategory Class Reference

Represents a single log category with verbosity control. More...

#include <LogCategory.h>

Collaboration diagram for EngineCore::LogCategory:

Public Member Functions

 LogCategory (const char *name, LogVerbosity defaultVerbosity, LogVerbosity compileTimeVerbosity)
 Construct a log category.
const char * getName () const
 Get the category name.
LogVerbosity getVerbosity () const
 Get current runtime verbosity.
constexpr LogVerbosity getCompileTimeVerbosity () const
 Get compile-time verbosity (for constexpr checks)
void setVerbosity (LogVerbosity verbosity)
 Set runtime verbosity.
bool isSuppressed (LogVerbosity messageVerbosity) const
 Check if a message at the given verbosity should be logged.

Private Attributes

const char * name_
std::atomic< LogVerbosityruntimeVerbosity_
const LogVerbosity compileTimeVerbosity_

Detailed Description

Represents a single log category with verbosity control.

Each category has:

  • A name (e.g., "LogLOD")
  • A runtime verbosity (can be changed at runtime)
  • A compile-time verbosity (messages below this are compiled out)

Definition at line 88 of file LogCategory.h.

Constructor & Destructor Documentation

◆ LogCategory()

EngineCore::LogCategory::LogCategory ( const char * name,
LogVerbosity defaultVerbosity,
LogVerbosity compileTimeVerbosity )

Construct a log category.

Parameters
nameCategory name (should start with "Log")
defaultVerbosityInitial runtime verbosity
compileTimeVerbosityMaximum verbosity that gets compiled in

Definition at line 44 of file LogCategory.cpp.

References compileTimeVerbosity_, EngineCore::LogCategoryManager::get(), name_, EngineCore::LogCategoryManager::registerCategory(), and runtimeVerbosity_.

Here is the call graph for this function:

Member Function Documentation

◆ getCompileTimeVerbosity()

LogVerbosity EngineCore::LogCategory::getCompileTimeVerbosity ( ) const
inlinenodiscardconstexpr

Get compile-time verbosity (for constexpr checks)

Definition at line 106 of file LogCategory.h.

References compileTimeVerbosity_.

◆ getName()

const char * EngineCore::LogCategory::getName ( ) const
inlinenodiscard

Get the category name.

Definition at line 100 of file LogCategory.h.

References name_.

Referenced by EngineCore::logImpl(), EngineCore::logImplSimple(), and EngineCore::LogCategoryManager::registerCategory().

Here is the caller graph for this function:

◆ getVerbosity()

LogVerbosity EngineCore::LogCategory::getVerbosity ( ) const
inlinenodiscard

Get current runtime verbosity.

Definition at line 103 of file LogCategory.h.

References runtimeVerbosity_.

◆ isSuppressed()

bool EngineCore::LogCategory::isSuppressed ( LogVerbosity messageVerbosity) const
inlinenodiscard

Check if a message at the given verbosity should be logged.

Parameters
messageVerbosityVerbosity of the message
Returns
true if the message should be suppressed (not logged)

Definition at line 116 of file LogCategory.h.

References runtimeVerbosity_.

◆ setVerbosity()

void EngineCore::LogCategory::setVerbosity ( LogVerbosity verbosity)
inline

Set runtime verbosity.

Definition at line 109 of file LogCategory.h.

References runtimeVerbosity_.

Member Data Documentation

◆ compileTimeVerbosity_

const LogVerbosity EngineCore::LogCategory::compileTimeVerbosity_
private

Definition at line 124 of file LogCategory.h.

Referenced by getCompileTimeVerbosity(), and LogCategory().

◆ name_

const char* EngineCore::LogCategory::name_
private

Definition at line 122 of file LogCategory.h.

Referenced by getName(), and LogCategory().

◆ runtimeVerbosity_

std::atomic<LogVerbosity> EngineCore::LogCategory::runtimeVerbosity_
private

Definition at line 123 of file LogCategory.h.

Referenced by getVerbosity(), isSuppressed(), LogCategory(), and setVerbosity().


The documentation for this class was generated from the following files:
  • /home/magerbeton/Documents/gl3-vulkan/Engine/include/Engine/Logging/LogCategory.h
  • /home/magerbeton/Documents/gl3-vulkan/Engine/src/Engine/Logging/LogCategory.cpp