Benign rust 108 installs Download

color-log 10.2.10

“A Rust logging library that supports both asynchronous and synchronous logging. It provides multiple log levels, such as error, info, and d…”

Basename is uppercase README.mdC header template (.h.in) file
SHA-256d7a6f6300ac3534c1acebfdb2f0a3807223403df5928e9e28edbb74b6c41b9ba

Evidence

References the Tokio async runtime namespace fn.rs · lines 1–8
1use super::*;
2
3#[tokio::test]
4async fn test() {
5 let log: FileLogger = FileLogger::new("./logs", 1_024_000);
6 let trace_str: String = String::from("custom trace message");
7 log.trace(trace_str, |trace: String| {
8 let write …
English function-word token "for" fn.rs · lines 113–117
113:6… io::test]
114async fn test_more_log_second() {
115 for _ in 0..10 {
116 let log: FileLogger = FileLogger::new("./logs", 512_000);
117 log.trace("trace da …
assert_eq! macro fn.rs · lines 136–140
136:33… rn")
137 .set_error_dir("custom_error");
138 assert_eq!(log.get_trace_dir(), "custom_trace");
139 assert_eq!(log.get_debug_dir(), "custom_debug");
140 …
imports std::fs::read_dir lib.rs · lines 1–24
1//! color-log
2//!
3//! A Rust logging library that supports both asynchronous and synchronous logging.
4//! It provides multiple log levels, such as error, info, and debug.
5//! Users can define custom log handling methods and configure log file paths.
6//! The library supports log rotation, automatically creating a new log file
7//! when the current file reaches the specified size limit.
8//! It allows flexible logging configurations, making it suitable for
9//! both high-performance asynchronous applications and
10//! traditional synchronous logging scenarios. The asynchronous mode utilizes
⋯7 lines
18mod r#trait;
19
20pub use {r#const::*, r#fn::*, r#struct::*, r#trait::*};
21
22use std::{fs::read_dir, io::Error};
23
24use {file_operation::*, lombok_macros::*, system_time::*};
At least four Markdown section headings README.md · lines 1–41
⋯5 lines
6[![](https://img.shields.io/crates/d/color-log.svg)](https://img.shields.io/crates/d/color-log.svg)
7[![](https://docs.rs/color-log/badge.svg)](https://docs.rs/color-log)
8[![](https://github.com/crates-dev/ctares/workflows/Rust/badge.svg)](https://github.com/crates-dev/ctares/actions?query=workflow:Rust)
9[![](https://img.shields.io/crates/l/color-log.svg)](./LICENSE)
10
11</center>
12
13[Api Docs](https://docs.rs/color-log/latest/)
14
15## Description
16
17> A Rust logging library that supports both asynchronous and synchronous logging. It provides multiple log levels, such as error, info, and debug. Users can define custom log handling methods and configure log file paths. The library supports log rotation, automatically creating a new log file when the current file reaches the specified size limit. It allows flexible logging configurations, making it suitable for both high-performance asynchronous applications and traditional synchronous logging scenarios. The asynchronous mode utilizes Tokio's async channels for efficient log buffering, while the synchronous mode writes logs directly to the file system.
18
19## Log Storage Location Description
20
21> Three directories will be created under the user-specified directory: one for error logs, one for info logs, and one for debug logs. Each of these directories will contain a subdirectory named by the date, and the log files within these subdirectories will be named in the format `timestamp.index.log`.
22
23## Installation
24
25To install `color-log` run cmd:
26
27```shell
28cargo add color-log
29```
30
31## License
32
33This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
34
35## Contributing
36
37Contributions are welcome! Please open an issue or submit a pull request.
38
39## Contact
40
41For any inquiries, please reach out to the author at [[email protected]](mailto:[email protected]).

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.