A simple and easy to use library for logging in python
Project description
Logs4theLazy
Easily add logs to your python projects!
View Demo
·
Report Bug
·
Request Feature
Table of Contents
Overview
Logs4theLazy allows you easily add detailed, descriptive, and well-structured logs to your project.
Logs4theLazy allows you to
- Define custom logging patterns
- Or you could just use a prebuilt one
- You can define the structure of your logs with LogFormats
- You can control where logs go through loggers
Getting Started
To install logs4thelazy, it is recommended to create a virtual environment and just use pip.
>>> python -m venv venv
>>> source venv/bin/activate
>>> pip install l4l
for Mac and Linux
or on Windows
>>> python -m venv venv
>>> source venv\Scripts\Activate.ps1
>>> pip install l4l
Usage
To start using logs4thelazy, you must first have it installed. After you install logs4thelazy, you must import it
import l4l
With logs4thelazy imported, you can use the basic default loggers
# l4l_example.py
import l4l
logger = l4l.BaseLogger(name="logger")
logger.log(l4l.from_value("Hello logging4thelazy world!"), stdout=True)
and then if you run it
>>> python l4l_example.py
logger: List of all logs logged by logger, logger
logger: Hello logging4thelazy world!
Roadmap
- Create basic working logger
- Create some extra logger classes that do things such as log to a file, log to a database, format the log, log with a trace-back, etc.
- Add some documentation
See the open issues for a full list of proposed features (and known issues).
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make logs4thelazy better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE
for more information.
Contact
Yosi Frost - yosi_frost@icloud.com
Project Link: [https://github.com/FrostyTheSouthernSnowman/logging4thelazy(https://github.com/FrostyTheSouthernSnowman/logging4thelazy)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for logs4thelazy-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7585a0949f3727aa0420f077719ea09dbb73ef7130d2f9ce24ba76db8ec419f |
|
MD5 | d382da4297c4d3d87c3a0033ca113e80 |
|
BLAKE2b-256 | 954ab6250064400c17e179fdb134acc4d33d6ac3ea4f5fcaa337d2b3975045bd |