A simple logger for python, but with colours!
Reason this release was yanked:
Will not work, no matter the solution.
Project description
Aerialog
A simple, yet effective logger built in Python.
Features
- Easily log to terminal or file
- Coloured coded (only within terminal)
- Log to file later on, and remove it
- Lightweight, only needing one extra dependency
- Load Log Level through .env or set it through the class
Using Aerialog
- Run
python3 -m venv envand then activate the environment throughsource env/bin/activate(may differ on Windows) - Install the dependency using your preferred method
pip install aerialog - Import the dependency into your code
import aerialog.logger import Logger - Initalise the class and freely use it
log = Logger()
You may also use .env files and directly set the log_level through that too
#FATAL, ERROR, WARN, INFO, DEBUG, SILLY
# If not any of those above, it will default to DEBUG
# If it's not called LOG_LEVEL it will also default to DEBUG
LOG_LEVEL=DEBUG
Example
from aerialog import Logger
log = Logger()
def main():
log.info("This is a really interesting info message!", "Main")
log.error("Oh no! an error happened here", "Error")
def file_setup():
log.set_file("awesome-project.log")
log.info("This now gets logged to the file!", "File")
log.remove_file() # It will now log back to the terminal
Licence
This project uses the following license: PYTHON PACKAGING AUTHORITY.
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
aerialog-0.0.2.tar.gz
(4.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aerialog-0.0.2.tar.gz.
File metadata
- Download URL: aerialog-0.0.2.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1babfd0fb58511f87bb5ee01319f11fe875825e230e45e0b173262ff1547624a
|
|
| MD5 |
1310e70672045649bb7c0c01a1e66c12
|
|
| BLAKE2b-256 |
f1bd6e905fc7803b7cc823bed7bd4915cb85618db90a9c5194f4dc3a0e996618
|
File details
Details for the file aerialog-0.0.2-py3-none-any.whl.
File metadata
- Download URL: aerialog-0.0.2-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ebcb7a4aceca82b1a293c5b1d48f028666bcdc1dc85a01fe6f82581ce3bcf89
|
|
| MD5 |
631ec9d4bb38ff5142375a5aad354c5e
|
|
| BLAKE2b-256 |
dc77f86bd5ce45423b235cd639de8383697baa828df8edc20ad3f3620b39c9ef
|