Skip to main content

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

  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.3.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.3-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

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

Hashes for aerialog-0.0.3.tar.gz
Algorithm Hash digest
SHA256 bb62498d58d295644608db165c2e93220eb82cf347c82df222cd2d8f2345cea4
MD5 618a2e203eec7439c4ddbdfb55752a13
BLAKE2b-256 7216781fda707aa99e058c70416121e2914c17c9e3999088515bb3040845e4ad

See more details on using hashes here.

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

Hashes for aerialog-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a0ed1af1df529d5d0c1330478aa28a6776355280e08d4c854ff15827c88c11ca
MD5 175c7f6ffae1f5b86d74f6efdbde08dc
BLAKE2b-256 10f5bedf2044eb533730f75bcb21e8307369552be9bc503f2448e5dad1c61d33

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