|
ORE Studio 0.0.4
|
Manages the starting and stopping of logging for an application. More...
#include <lifecycle_manager.hpp>


Public Member Functions | |
| lifecycle_manager (lifecycle_manager &&)=delete | |
| lifecycle_manager & | operator= (const lifecycle_manager &)=delete |
| lifecycle_manager (std::optional< logging_options > ocfg) | |
| Initialise logging for the entire application. | |
| virtual | ~lifecycle_manager () |
| Shutdown logging for the entire application. | |
Static Protected Member Functions | |
| static boost::shared_ptr< file_sink_type > | make_file_sink (std::filesystem::path path, boost_severity severity, std::string tag) |
| Creates a boost log file sink. | |
| static boost::shared_ptr< console_sink_type > | make_console_sink (boost_severity severity, std::string tag) |
| Creates a boost log console sink. | |
Protected Attributes | |
| boost::shared_ptr< file_sink_type > | file_sink_ |
| boost::shared_ptr< console_sink_type > | console_sink_ |
Manages the starting and stopping of logging for an application.
This class handles the lifecycle of console and file logging sinks. For telemetry sink support (OTLP log correlation), use the extended lifecycle_manager in ores.telemetry.
Note: this class uses boost shared_ptr due to legacy reasons (boost log does not support std::shared_ptr).
|
explicit |
Initialise logging for the entire application.
If no configuration is supplied, logging is disabled.
|
virtual |
Shutdown logging for the entire application.
Should be done in a thread-safe context.
Reimplemented in lifecycle_manager.
|
staticprotected |
Creates a boost log file sink.
