Skip to main content

conlog

A console logger / debugger for Python CLI programs

Currently conlog only support functions. support for classes will be added later.

Installation

$ pip install conlog

Getting Started

# Create a Conlog from the constructor.
conlog = Conlog.create("main")

# Set the required logging level
conlog.level = Conlog.DEBUG

# To use on the `main` module
console = conlog.get_console()

####  in module2.py

@Conlog.fn
def say_hi(name):
	console = Conlog.get_console("main")
	console.debug("args {name=}")
	print(f"Hi {name}"

How it works.

console.debug supports expr debug expressions introduced in Python 3.8. It dynamically rewrites the function in Python 3.8 and uses a beautiful way to support it in < 3.7

See tests/ for samples.

License


Copyright (c) 2019 Cswl Coldwind

conlog is distributed under the terms

  • MIT License <https://choosealicense.com/licenses/mit>_

Metadata

Release files for con-log 1.0.7

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

Source distribution (sdist)

Source distribution for con-log 1.0.7
File Size Uploaded
con-log-1.0.7.tar.gz 6.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for con-log 1.0.7
File Interpreter ABI Platform
con_log-1.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 15.1 kB

Release files / con-log-1.0.7.tar.gz

Download URL con-log-1.0.7.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
3095699b51d01c19d699e717a64533b55f54662f1bdfc85eb2e621673653b015
BLAKE2b-256 checksum
How to use checksums
0673a6983fa53c74a51d2578e300d055d0c8614eba40342a2e2a430381e9a4e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.5

Release files / con_log-1.0.7-py3-none-any.whl

Download URL con_log-1.0.7-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ed8f8a5a8654a38bc3e5198ecd440b72645faf97fe5b819ec1650814020b9c80
BLAKE2b-256 checksum
How to use checksums
a160887fb41edd9ef8d867f56a18a80693c0532d8937a21ace64fa61aa7fc4c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.5

Release history Release notifications | RSS feed

This release

1.0.7 This release

2 release files

1.0.3

2 release files

0.6.0

2 release files

0.5.6

2 release files

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