grpc_logger 0.10.0

A gRPC-based logging system with multiple output modes and retry capabilities
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
pub mod config;
pub mod grpc;
pub mod server_build;

pub use crate::server_build::LoggingService;
pub use config::{load_config, setup_logging, LogConfig};
pub use grpc::GrpcLayer;

/// Initialize the logging service with a given configuration file
pub async fn init(config_path: &str) -> Result<LoggingService, Box<dyn std::error::Error + Send + Sync>> {
    let config = load_config(config_path)?;
    let service = LoggingService::new();

    // Initialize the service
    service.init(&config).await?;

    Ok(service)
}