Skip to main content

No project description provided

Project description

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>_

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for con-log, version 1.0.7
Filename, size File type Python version Upload date Hashes
Filename, size con_log-1.0.7-py3-none-any.whl (9.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size con-log-1.0.7.tar.gz (6.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page