Skip to main content

Avologger

built with Python3

A generic logging class for Python

Basic setup and usage are simple. Just import the class and create a Logger instance with a location to save the log file, it will handle everything else!
The log files will even be capped at a configurable limit and rotated after they have reached the limit.

To install (via pip): Next run the install command:

pip install avologger

To install (via source): Download the source files as an archive and extract them on your computer.

Next run the install command:

python setup.py install

Usage (for more detailed example see avologger_sample.py in sample directory):

from avologger import Logger

def main():
    log = Logger("/logs/test.log")

    log.info("This is a test...")
    log.error("We have a problem!")

if __name__ == "__main__":
    main()

Attributes

  • Log File Location
  • Logger Name (Default: Calling script)
  • Max Log File Size {in Megabytes} (Default: 1 MB)
  • Log File Backup Count (Default: 10)
  • Logging Level (Default: INFO)
  • Log Format (Default: %(levelname)s: [%(name)s]: %(asctime)s - %(message)s)
  • Date Format (Default: %m/%d/%Y %H:%M:%S)

All attributes are configurable, and all except log file location have default values.

Additional Features

  • Timing decorator (captures the run time of wrapped functions)
  • Logs any uncaught exeptions with the addition of 1 line to your code

Logging Levels

  • DEBUG
  • INFO
  • WARNING
  • ERROR
  • CRITICAL
  • EXCEPTION

Log File Sample Output

Metadata

Release files for avologger 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for avologger 1.0.4
File Size Uploaded Provenance
avologger-1.0.4.tar.gz 6.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for avologger 1.0.4
File Interpreter ABI Platform
avologger-1.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 11.4 kB

Release files / avologger-1.0.4.tar.gz

Download URL avologger-1.0.4.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b5030d5ea3acc2b6e2a663dff7293923649a815585ea5386778309cafdd3ce7d
BLAKE2b-256 checksum
How to use checksums
d09504ef29067a475c4d99c0b554e26aa8f4214bc8c672652072ef7b41f64c54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / avologger-1.0.4-py3-none-any.whl

Download URL avologger-1.0.4-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
64d131395055a619c630a8ca7d77badc90d4680c772f05235aeafdf24cf05324
BLAKE2b-256 checksum
How to use checksums
35dfebc901797e43681b3818a5135111f2fad4d1ed9b6ed7f3dd4e4cab1262fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Security for avologger 1.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page