Expand description
Logly: High-performance structured logging library for Rust
A production-ready logging library with async support, GPU acceleration, file rotation, filtering, callbacks, and comprehensive error handling.
§Features
- 8 Log Levels: TRACE, DEBUG, INFO, SUCCESS, WARNING, ERROR, FAIL, CRITICAL
- Custom Log Levels: Define your own levels with custom priorities and colors
- Structured Logging: JSON and custom format support
- Async Logging: Non-blocking writes with configurable buffers
- GPU Acceleration: Optional CUDA support for high-throughput scenarios
- File Rotation: Time-based and size-based rotation with retention policies
- Filtering: Level, module, and function-based filtering
- Callbacks: Log, color, and exception callbacks
- Context Binding: Persistent and temporary context fields
§Quick Start
use logly::prelude::*;
let logger = Logger::new();
logger.add_sink(SinkConfig::default())?;
logger.info("Application started".to_string())?;
logger.success("Operation completed!".to_string())?;
logger.warning("Warning message".to_string())?;
logger.error("Error occurred".to_string())?;§Version
Current version: 0.0.4
§Repository
https://github.com/muhammad-fiaz/logly-rs
§Author
muhammad-fiaz contact@muhammadfiaz.com
Re-exports§
pub use callback::CallbackManager;pub use callback::ColorCallback;pub use callback::ExceptionCallback;pub use callback::LogCallback;pub use config::LoggerConfig;pub use config_file::ConfigFileLoader;pub use error::LoglyError;pub use error::Result;pub use gpu::GpuLogger;pub use level::CustomLevel;pub use level::Level;pub use logger::Logger;pub use record::LogRecord;pub use rotation::RotationManager;pub use rotation::RotationPolicy;pub use sink::Sink;pub use sink::SinkConfig;pub use version::VersionChecker;
Modules§
- callback
- Callback system for log events
- config
- config_
file - error
- Error types and result handling
- filter
- Log record filtering
- format
- Log record formatting with color support
- gpu
- GPU/CUDA acceleration for high-performance logging
- level
- Log levels with priority-based ordering
- logger
- Main logger implementation
- prelude
- record
- Log record structure
- rotation
- File rotation and retention management
- sink
- Sink management for log outputs
- utils
- Utility functions
- version
- Auto-update version checking
Structs§
- Date
Time - ISO 8601 combined date and time with time zone.
- Utc
- The UTC time zone. This is the most efficient time zone when you don’t need the local time. It is also used as an offset (which is also a dummy type).
Enums§
- Json
Value - Represents any valid JSON value.