Logging Subsystem
Log file location
The log file is written to the build output directory alongside the executable:
build/src/Debug/logs/glitter.log
The relative path logs/glitter.log is configured in engine.config.json.
Log levels
Configured via engine.config.json. Standard levels: trace, debug, info,
warn, error, critical.
Sinks
Log output goes to two sinks:
| Sink | Description |
|---|---|
| File sink | Writes to logs/glitter.log alongside the executable |
| Console sink | Routes messages to the developer console log pane (colour-coded by level) |
The ConsoleSink (src/system/consoleSink.h) is a spdlog sink that formats
messages as [name] [level] message and calls Console::addLine().
Usage in C++
Logging example
// Via the engine logger (spdlog-backed)
auto log = glitter::getLogger("my_subsystem");
log->info("Scene loaded: {}", sceneName);
log->warn("Missing texture: {}", texturePath);
log->error("Renderer failed to initialise");