Skip to main content

EZlogR for Python!

Overview

This module helps developers focus on writing code and less time worrying about writing logs.

How it works

EZlogR gives a standardized way for developers to write logs, and creates these logs in JSON format. JSON is easily digestable by a multitude of programs and databases. This lets the developer have the option to easily pull the logs into something like MongoDB, a JSON viewing tool, or still be easily human readable due to the simplified and flat nature of the JSON packing.

Installation

install EZlogR using pip or pip3:
pip install ezlogr
or
pip3 install ezlogr

Usage

Here is a simple python file that shows EZlogR in action.
Filename: simple_sample.py

#!/usr/bin/env python3
#Step 1: Import ezlogr
import ezlogr

#Step 2: Set some tags
tags = ["Very cool app", "non-prod"]

#Step 3: Set the filename for your logs. (This will automatically append .log to the .py filename like this: 'myfile.py.log')
filename = __file__

#Step 4: Make your logger instance.
logger = ezlogr.Ezlogr(filename=filename, tags=tags)

#Step 5: Now write your code with EZlogR!
import time
logger.info("Here I go writin' logs!")
time.sleep(1)
logger.info("I'm doing it again!")

Output

After using EZlogR, you will see logs like this:
Filename: simple_sample.py.log

{'filename': '/Users/jeremy/simple_sample.py', 'log_level': 'info', 'hrtimestamp': 'Wed Jun 17 10:07:23 2020', 'datestamp': '17062020', 'timestamp': '100723.921712', 'log_msg': "Here I go writin' logs!", 'tags': '["Very cool app", "non-prod"]'}
{'filename': '/Users/jeremy/simple_sample.py', 'log_level': 'info', 'hrtimestamp': 'Wed Jun 17 10:07:24 2020', 'datestamp': '17062020', 'timestamp': '100724.926889', 'log_msg': "I'm doing it again!", 'tags': '["Very cool app", "non-prod"]'}

Release files for EZlogR 0.1

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

Source distribution (sdist)

Source distribution for EZlogR 0.1
File Size Uploaded
EZlogR-0.1.tar.gz 3.0 kB Details

Built distribution (wheel)

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

Total release size: 6.0 kB

Release files / EZlogR-0.1.tar.gz

Download URL EZlogR-0.1.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ed3c57f0d069aa21f27941f57dc83dcdd5d0f79ab66ad7be87f66e17d38b6c16
BLAKE2b-256 checksum
How to use checksums
cc52cd9b81a2095c5383cb98e94f0bf28ce8c761136891552dbd44b0c8909b86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

Release files / EZlogR-0.1-py3-none-any.whl

Download URL EZlogR-0.1-py3-none-any.whl
Size 3.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
db925ba4cea14a602b3673a51b67c68581e6fa72ef2ced79f50e22da60e972e2
BLAKE2b-256 checksum
How to use checksums
0d73a4db04e122bc0c0520ce6a9f609730c806ce0d683b7823866118b61f179a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3
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