[go: up one dir, main page]

Crate telelog

Crate telelog 

Source
Expand description

§Telelog - High-Performance Structured Logging

Telelog is a high-performance logging library for Rust that provides:

  • Structured JSON-first logging
  • Performance profiling and monitoring
  • Cross-language bindings support
  • System resource monitoring
  • Context management and decorators

§Quick Start

use telelog::{Logger, LogLevel};

let logger = Logger::new("my_app");
logger.info("Application started");

// With structured data
logger.info_with("User logged in", &[
    ("user_id", "12345"),
    ("session_id", "abcdef"),
]);

// Performance profiling
let _guard = logger.profile("expensive_operation");
// Your expensive operation here

§Features

  • Zero-allocation logging in hot paths
  • Structured logging with JSON output
  • Performance profiling with minimal overhead
  • Rich console output with colors and formatting
  • System monitoring integration
  • Thread-safe and async-ready

Re-exports§

pub use component::Component;
pub use component::ComponentGuard;
pub use component::ComponentMetadata;
pub use component::ComponentStatus;
pub use component::ComponentTracker;
pub use config::Config;
pub use context::Context;
pub use context::ContextGuard;
pub use level::LogLevel;
pub use logger::Logger;
pub use output::BufferedOutput;
pub use output::LogMessage;
pub use profile::ProfileGuard;
pub use visualization::ChartConfig;
pub use visualization::ChartType;
pub use visualization::Direction;
pub use visualization::MermaidGenerator;
pub use monitor::SystemMonitor;

Modules§

component
Component tracking for visualization
config
Configuration management for telelog
console
Console output utilities
context
Context management for structured logging
format
Output formatting utilities
level
Log level definitions and utilities
logger
Main logger implementation
monitor
System monitoring utilities
output
Output destination management
profile
Performance profiling utilities
visualization
Mermaid visualization for component tracking

Constants§

VERSION
Current version of the telelog library

Functions§

init
Initialize telelog with default configuration
init_with_config
Initialize telelog with custom configuration