Skip to main content

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

  1. Run python3 -m venv env and then activate the environment through source env/bin/activate (may differ on Windows)
  2. Install the dependency using your preferred method pip install aerialog
  3. Import the dependency into your code import aerialog.logger import Logger
  4. 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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aerialog-0.0.2-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

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

Hashes for aerialog-0.0.2.tar.gz
Algorithm Hash digest
SHA256 1babfd0fb58511f87bb5ee01319f11fe875825e230e45e0b173262ff1547624a
MD5 1310e70672045649bb7c0c01a1e66c12
BLAKE2b-256 f1bd6e905fc7803b7cc823bed7bd4915cb85618db90a9c5194f4dc3a0e996618

See more details on using hashes here.

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

Hashes for aerialog-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1ebcb7a4aceca82b1a293c5b1d48f028666bcdc1dc85a01fe6f82581ce3bcf89
MD5 631ec9d4bb38ff5142375a5aad354c5e
BLAKE2b-256 dc77f86bd5ce45423b235cd639de8383697baa828df8edc20ad3f3620b39c9ef

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page