Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/metov/metovlogs
Dead simple Python logging
https://github.com/metov/metovlogs
logging python utility
Last synced: 14 days ago
JSON representation
Dead simple Python logging
- Host: GitHub
- URL: https://github.com/metov/metovlogs
- Owner: metov
- License: mit
- Created: 2022-02-01T04:34:59.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T02:15:45.000Z (almost 2 years ago)
- Last Synced: 2024-10-04T21:16:17.783Z (about 1 month ago)
- Topics: logging, python, utility
- Language: Python
- Homepage:
- Size: 16.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# metovlogs
> Dead simple Python logging.
metovlogs is a very simple logging library. Setup is one line, then you can use it as a drop-in `print` replacement. Sane and useful log format out of the box. Best for small or early stage projects.
## Usage
Initialize the logger by calling `get_log`:
```
import metovlogs# The name will be used to annotate the log
# __name__ is name of the current Python module
log = metovlogs.get_log(__name__)
```Now you can use it as a drop-in replacement for all your `print`s:
```
# Do some stuff
log.info("Finished doing some stuff")log.debug("About to start doing other stuff")
# Do some other stuff
```metovlogs is like [black](https://github.com/psf/black) for logs: You get reasonable behavior by default and [minimal customization](doc/tweaks.md). This allows you to focus on developing without distraction. If you want to customize your logs more, you should use something else.
## Installation
```
pip install metovlogs
```## Further reading
* [Background](doc/background.md)
* [Contribution guidelines](doc/contributing.md)
* [Planned future work](doc/todo.md)