chore(version): 更新 log4rc 版本至 0.1.2 并修正文档引用

This commit is contained in:
程广 2025-09-30 17:40:32 +08:00
parent 79b05f91a8
commit e71787c126
3 changed files with 10 additions and 10 deletions

2
Cargo.lock generated
View File

@ -112,7 +112,7 @@ checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432"
[[package]]
name = "log4rc"
version = "0.1.1"
version = "0.1.2"
dependencies = [
"chrono",
]

View File

@ -1,6 +1,6 @@
[package]
name = "log4rc"
version = "0.1.1"
version = "0.1.2"
edition = "2024"
authors = ["log4r contributors"]
description = "A log4j-like logging framework for Rust"

View File

@ -1,19 +1,19 @@
//! # log4r - A log4j-like logging framework for Rust
//! # log4rc - A log4j-like logging framework for Rust
//!
//! This crate provides a simple, extensible logging framework similar to log4j.
//!
//! ## Example
//!
//! ```
//! use log4r::{LogLevel, Logger};
//! use log4rc::{LogLevel, Logger};
//!
//! Logger::init(LogLevel::Debug);
//!
//! log4r::trace!("This is a trace message");
//! log4r::debug!("This is a debug message");
//! log4r::info!("This is an info message");
//! log4r::warn!("This is a warning message");
//! log4r::error!("This is an error message");
//! log4rc::trace!("This is a trace message");
//! log4rc::debug!("This is a debug message");
//! log4rc::info!("This is an info message");
//! log4rc::warn!("This is a warning message");
//! log4rc::error!("This is an error message");
//! ```
use std::{sync::{Mutex, OnceLock}, time};
@ -62,7 +62,7 @@ pub trait Layout: Send + Sync {
fn format(&self, event: &LogEvent) -> String;
}
/// Simple layout that formats log events as "[LEVEL] message"
/// Simple layout that formats log events as "\[level\] message"
pub struct SimpleLayout;
impl Layout for SimpleLayout {