Crates.io | logly |
lib.rs | logly |
version | 0.0.3 |
source | src |
created_at | 2024-01-09 15:19:43.468981 |
updated_at | 2024-02-24 15:06:58.432459 |
description | A Rust logging package designed to simplify and enhance your logging experience. |
homepage | |
repository | https://github.com/muhammad-fiaz/logly-rs.git |
max_upload_size | |
id | 1094107 |
size | 24,962 |
if you like this project make sure to star 🌟 it in the repository and if you want to contribute make sure to fork this repository❤✨.
cargo add logly
use logly::logly::*;
let logly = logly::new(); //intialize the logly
logly.start_logging("test_log.txt"); //start storing the log messages in txt, make sure to pass to create the log file
logly.info("Key1", "Value1", LogColor::Cyan); // message with custom color if you don't want just set it None
logly.warn("Key2", "Value2", LogColor::Yellow);
logly.stop_logging(); //this will stop storing the message from here but it will display
logly.warn("Key3", "Value3", LogColor::Yellow);
Level | Color Code |
---|---|
INFO | CYAN |
WARNING | YELLOW |
ERROR | RED |
DEBUG | BLUE |
CRITICAL | BRIGHT RED |
TRACE | BLUE |
DEFAULT | WHITE |
You can use any of the following color codes for custom coloring:
NAME | Color Code |
---|---|
CYAN | CYAN |
YELLOW | YELLOW |
RED | RED |
BLUE | BLUE |
BRIGHT RED | CRITICAL |
WHITE | WHITE |
Contributions are welcome! Before contributing, please read our Contributing Guidelines to ensure a smooth and collaborative development process.
If you encounter any issues or have suggestions, feel free to open an issue on GitHub!
Please review our Code of Conduct to understand the standards of behavior we expect from contributors and users of this project.
This project is licensed under the MIT License. See LICENSE for more details.