Git Product home page Git Product logo

logly-rs's Introduction

logo banner

logly.rs

Rust Crates.io Version Crates.io Downloads Crates.io License Crates.io Stability License: MIT GitHub issues GitHub forks GitHub stars GitHub license GitHub contributors GitHub pull-requests Last Commit

Maintainer Sponsor on GitHub

Logly is a simple logging utility for rust that provides an easy way to log messages with different levels, colors, and options. It is designed to be flexible, allowing you to customize the log messages based on your application's needs. Logly supports logging to both the console and a file, and it comes with built-in color-coded log levels for better visibility.

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❤✨.

Installation

cargo add logly

Usage

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);

Color Options:

Default Color Options:

Level Color Code
INFO CYAN
WARNING YELLOW
ERROR RED
DEBUG BLUE
CRITICAL BRIGHT RED
TRACE BLUE
DEFAULT WHITE

Custom Color Options:

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

Contributing

Contributions are welcome! Before contributing, please read our Contributing Guidelines to ensure a smooth and collaborative development process.

Issues

If you encounter any issues or have suggestions, feel free to open an issue on GitHub!

Code of Conduct

Please review our Code of Conduct to understand the standards of behavior we expect from contributors and users of this project.

License

This project is licensed under the MIT License. See LICENSE for more details.

Support the Project


💰 You can help this improve more by offering a little support! ❤️

Sponsor muhammad-fiaz

Happy Coding ❤️

logly-rs's People

Contributors

dependabot[bot] avatar muhammad-fiaz avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.