grpc_logger 0.7.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
use std::env;
use std::path::PathBuf;

fn main() {
    // Get the OUT_DIR environment variable at runtime
    let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());

    // Construct the path to the descriptor set file
    let descriptor_path = out_dir.join("logging_descriptor.bin");

    // Configure and compile the proto files
    tonic_build::configure()
        .protoc_arg("--experimental_allow_proto3_optional")
        .file_descriptor_set_path(descriptor_path)
        .compile_protos(&["log_service.proto"], &["proto"])
        .unwrap_or_else(|e| panic!("Failed to compile proto files: {}", e));
}