From 8d0481f5b79003f6a13706f57d908a30d30d80b9 Mon Sep 17 00:00:00 2001 From: Muhammad Fiaz Date: Sat, 24 Feb 2024 20:25:15 +0530 Subject: [PATCH] some minor improvements (v0.0.2) (#10) * some minor improvements (v0.0.2) * Update README.md added logo img * added comments * added issue section in README.md --- tests/integration_tests.rs | 2 +- Cargo.lock | 6 +++--- Cargo.toml | 7 ++++++- README.md | 15 ++++++++++----- src/lib.rs | 4 ++-- src/logly.rs | 1 + 6 files changed, 23 insertions(+), 12 deletions(-) diff --git a/ tests/integration_tests.rs b/ tests/integration_tests.rs index b964b19..2ad2a6e 100644 --- a/ tests/integration_tests.rs +++ b/ tests/integration_tests.rs @@ -3,7 +3,7 @@ use logly::logly::*; #[test] -fn test_start_and_stop_logging() { +pub fn test_start_and_stop_logging() { let logly = logly::new(); assert!(logly.start_logging("test_log.txt").is_ok()); diff --git a/Cargo.lock b/Cargo.lock index ba2be34..a8ae80a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -37,9 +37,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.11" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" +checksum = "96b09b5178381e0874812a9b157f7fe84982617e48f71f4e3235482775e5b540" dependencies = [ "anstyle", "anstyle-parse", @@ -226,7 +226,7 @@ checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "logly" -version = "0.0.1" +version = "0.0.2" dependencies = [ "ansi_term", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 9fb2ce8..1df7c5e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "logly" -version = "0.0.1" +version = "0.0.2" edition = "2021" description = "A Rust logging package designed to simplify and enhance your logging experience." license = "MIT" @@ -16,3 +16,8 @@ env_logger = "0.11.2" termcolor = "1.1" ansi_term = "0.12.1" regex = "1.10.2" + +# to use cargo run uncomment the following lines +#[[bin]] +#name = "logly" +#path = "src/lib.rs" \ No newline at end of file diff --git a/README.md b/README.md index a8600af..507b699 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@
+ +![logo banner](https://github.com/muhammad-fiaz/logly-rs/assets/75434191/500975cc-b5f4-46df-abe8-2d03c687a1c1) + # logly.rs [![Rust](https://github.com/muhammad-fiaz/logly-rs/actions/workflows/rust.yml/badge.svg)](https://github.com/muhammad-fiaz/logly-rs/actions/workflows/rust.yml) @@ -35,7 +38,7 @@ 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 file +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); @@ -76,6 +79,10 @@ You can use any of the following color codes for custom coloring: ## Contributing Contributions are welcome! Before contributing, please read our [Contributing Guidelines](CONTRIBUTING.md) to ensure a smooth and collaborative development process. +## Issues + +If you encounter any issues or have suggestions, feel free to [open an issue](https://github.com/muhammad-fiaz/logly-rs/issues) on GitHub! + ## Code of Conduct Please review our [Code of Conduct](CODE_OF_CONDUCT.md) to understand the standards of behavior we expect from contributors and users of this project. @@ -87,13 +94,11 @@ This project is licensed under the [MIT License](). See [LICENSE](LICENSE) for m
-
💰 You can help me improve more by offering a little support on any platform❤️
+
💰 You can help this improve more by offering a little support! ❤️
-[![BuyMeACoffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-ffdd00?style=for-the-badge&logo=buy-me-a-coffee&logoColor=black)](https://buymeacoffee.com/muhammadfiaz) [![Patreon](https://img.shields.io/badge/Patreon-F96854?style=for-the-badge&logo=patreon&logoColor=white)](https://patreon.com/muhammadfiaz) [![Ko-Fi](https://img.shields.io/badge/Ko--fi-F16061?style=for-the-badge&logo=ko-fi&logoColor=white)](https://ko-fi.com/muhammadfiaz) [![Sponsor muhammad-fiaz](https://img.shields.io/badge/Sponsor-%231EAEDB.svg?&style=for-the-badge&logo=GitHub-Sponsors&logoColor=white)](https://github.com/sponsors/muhammad-fiaz) -[![Open Collective Backer](https://img.shields.io/badge/Open%20Collective-Backer-%238CC84B?style=for-the-badge&logo=open-collective&logoColor=white)](https://opencollective.com/muhammadfiaz) -
+
## Happy Coding ❤️ diff --git a/src/lib.rs b/src/lib.rs index 5aee9b3..c8a05d1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,4 @@ // lib.rs -// Import the logly module -pub mod logly; +mod logly; + diff --git a/src/logly.rs b/src/logly.rs index 4700a8c..ac91b34 100644 --- a/src/logly.rs +++ b/src/logly.rs @@ -152,3 +152,4 @@ impl Logger { self.color_enabled = color_enabled; } } +