A simple logger for python, but with colours!
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.3.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.3.tar.gz.
File metadata
- Download URL: aerialog-0.0.3.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 |
bb62498d58d295644608db165c2e93220eb82cf347c82df222cd2d8f2345cea4
|
|
| MD5 |
618a2e203eec7439c4ddbdfb55752a13
|
|
| BLAKE2b-256 |
7216781fda707aa99e058c70416121e2914c17c9e3999088515bb3040845e4ad
|
File details
Details for the file aerialog-0.0.3-py3-none-any.whl.
File metadata
- Download URL: aerialog-0.0.3-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 |
a0ed1af1df529d5d0c1330478aa28a6776355280e08d4c854ff15827c88c11ca
|
|
| MD5 |
175c7f6ffae1f5b86d74f6efdbde08dc
|
|
| BLAKE2b-256 |
10f5bedf2044eb533730f75bcb21e8307369552be9bc503f2448e5dad1c61d33
|