|
Logger System 0.1.3
High-performance C++20 thread-safe logging system with asynchronous capabilities
|
Advanced monitoring integration example for Phase 4. More...
#include <kcenon/logger/core/logger_builder.h>#include <kcenon/common/interfaces/logger_interface.h>#include <kcenon/common/interfaces/monitoring_interface.h>#include <iostream>#include <memory>#include <vector>#include <thread>#include <chrono>#include <iomanip>#include <mutex>#include <unordered_map>
Go to the source code of this file.
Classes | |
| class | aggregating_monitor |
| Aggregating monitor that collects metrics from multiple sources. More... | |
Functions | |
| void | print_metrics_snapshot (const ci::metrics_snapshot &snapshot) |
| Print metrics snapshot in formatted way. | |
| void | print_health_result (const ci::health_check_result &health) |
| Print health check result. | |
| void | example_1_basic_integration () |
| Example 1: Basic monitor integration with logger. | |
| void | example_2_multiple_loggers () |
| Example 2: Multiple loggers with single monitor. | |
| void | example_3_imonitorable_interface () |
| Example 3: Demonstrating IMonitorable interface. | |
| void | example_4_monitoring_system_simulation () |
| Example 4: Simulating monitoring_system integration. | |
| int | main () |
Advanced monitoring integration example for Phase 4.
Definition in file monitoring_integration_example.cpp.
| void example_1_basic_integration | ( | ) |
Example 1: Basic monitor integration with logger.
Definition at line 199 of file monitoring_integration_example.cpp.
References kcenon::logger::logger_builder::build(), kcenon::common::get_value(), kcenon::common::is_ok(), print_health_result(), print_metrics_snapshot(), kcenon::logger::logger_builder::with_async(), and kcenon::logger::logger_builder::with_monitoring().
Referenced by main().


| void example_2_multiple_loggers | ( | ) |
Example 2: Multiple loggers with single monitor.
Definition at line 244 of file monitoring_integration_example.cpp.
References kcenon::logger::logger_builder::build(), kcenon::common::get_value(), kcenon::common::is_ok(), print_metrics_snapshot(), kcenon::logger::logger_builder::with_async(), and kcenon::logger::logger_builder::with_monitoring().
Referenced by main().


| void example_3_imonitorable_interface | ( | ) |
Example 3: Demonstrating IMonitorable interface.
Definition at line 293 of file monitoring_integration_example.cpp.
References kcenon::logger::logger_builder::build(), kcenon::common::get_value(), kcenon::common::is_ok(), print_health_result(), print_metrics_snapshot(), kcenon::logger::logger_builder::with_async(), and kcenon::logger::logger_builder::with_monitoring().
Referenced by main().


| void example_4_monitoring_system_simulation | ( | ) |
Example 4: Simulating monitoring_system integration.
Definition at line 335 of file monitoring_integration_example.cpp.
References kcenon::logger::logger_builder::build(), kcenon::common::get_value(), kcenon::common::is_ok(), print_health_result(), print_metrics_snapshot(), kcenon::logger::logger_builder::with_async(), and kcenon::logger::logger_builder::with_monitoring().
Referenced by main().


| int main | ( | ) |
Definition at line 386 of file monitoring_integration_example.cpp.
References example_1_basic_integration(), example_2_multiple_loggers(), example_3_imonitorable_interface(), and example_4_monitoring_system_simulation().

| void print_health_result | ( | const ci::health_check_result & | health | ) |
Print health check result.
Definition at line 177 of file monitoring_integration_example.cpp.
References kcenon::logger::size.
Referenced by example_1_basic_integration(), example_3_imonitorable_interface(), and example_4_monitoring_system_simulation().

| void print_metrics_snapshot | ( | const ci::metrics_snapshot & | snapshot | ) |
Print metrics snapshot in formatted way.
Definition at line 160 of file monitoring_integration_example.cpp.
Referenced by example_1_basic_integration(), example_2_multiple_loggers(), example_3_imonitorable_interface(), and example_4_monitoring_system_simulation().
