Small and simple logging library
Project description
EvaLogger
A simple alternative to the logging library
EvaLogger is a simple logging library for Python. It is designed to be easy to use and to be easily integrated into existing projects.
Usage
from evalogger import EvaLogger
import requests
log = EvaLogger() # create a EvaLogger instance
log.info("Hello World!") # log a info message
log.warn("Hello World!") # log a warning message
log.error("Hello World!") # log a error message
log.exception_error(RuntimeError("Hello World!")) # log a exception error message
log.success("Hello World!") # log a success message
log.network(requests.get("https://google.com")) # log a network request
log.network(requests.get("https://google.com"), text="Google") # log a network request with a custom name
Configuration
EvaLogger doesn't have alot of configuration options, but it does have some.
You can configure EvaLogger by setting the following properties on the EvaLogger instance.
from evalogger import EvaLogger
log = EvaLogger(save_to_file=True, filename="eva.log")
EvaLogger has support for multiple loggers at once.
from evalogger import EvaLogger
log_1 = EvaLogger(name="eva1", save_to_file=True, filename="eva1.log")
log_2 = EvaLogger(name="eva2", save_to_file=False)
log_1.info("Hello World!") # log a info message to eva1.log
log_2.info("Hello World!") # log an info message to stdout
Example
You can find all examples in the examples folder in the repository.
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
evalogger-0.1.1.tar.gz
(7.2 kB
view details)
Built Distribution
File details
Details for the file evalogger-0.1.1.tar.gz
.
File metadata
- Download URL: evalogger-0.1.1.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 591d69a318a36d32b1bc5eac51dcafc8f81ee2005aa3dc6bb87c85fa8c1f8e88 |
|
MD5 | 1e8bc93a1d3a4fff4ae4356694be09a8 |
|
BLAKE2b-256 | 9c15ef29e12bd057a799df9f0c521c9ce7ab39e7d4cfcd22b338f8605a5a67ee |
File details
Details for the file evalogger-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: evalogger-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6efda7fd953b563abde2a11ce6b3d6acccf44993d2e192b13c733b4a4b558b56 |
|
MD5 | 1535e5f63b5310577c7454f84ab62691 |
|
BLAKE2b-256 | 7cbb60336de3716603f31aacc0707d229d77efe765ac0d27164c04bd0c9bea38 |