|
QuasarEngine
Cross-platform 3D engine and editor
|
The loggers for the engine and the application. More...
#include <quasar/core/Log.h>
Static Public Member Functions | |
| static void | Init () |
| Creates the loggers. Calling it again does nothing. | |
| static void | Shutdown () |
| Destroys the loggers. Until Init() is called again, messages go to the fallback loggers. | |
| static spdlog::logger & | Engine () |
| Returns the logger for engine messages. | |
| static spdlog::logger & | App () |
| Returns the logger for application messages. | |
| static std::shared_ptr< MemoryLogSink > | GetMemorySink () |
| Returns the sink that keeps the most recent messages of both loggers, for the editor console. | |
Static Public Attributes | |
| static constexpr std::size_t | MemoryCapacity = 1000 |
| Number of messages kept by the memory sink. | |
The loggers for the engine and the application.
Owns the two loggers: one for engine messages and one for application messages.
Messages are written to the console and to the file QuasarEngine.log. In Debug, every level is written. In Release, only info, warning and error messages are written.
|
inlinestatic |
Returns the logger for engine messages.
Before Init() or after Shutdown(), it returns a fallback logger that only writes to the error output, so that writing a message never crashes.
|
inlinestatic |
Returns the logger for application messages.
Before Init() or after Shutdown(), it returns a fallback logger that only writes to the error output, so that writing a message never crashes.
|
inlinestatic |
Returns the sink that keeps the most recent messages of both loggers, for the editor console.
It keeps the last MemoryCapacity messages. Init() must have been called.