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.
Source Distribution
con-log-1.0.7.tar.gz
(6.1 kB
view details)
Built Distribution
File details
Details for the file con-log-1.0.7.tar.gz
.
File metadata
- Download URL: con-log-1.0.7.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3095699b51d01c19d699e717a64533b55f54662f1bdfc85eb2e621673653b015 |
|
MD5 | aa1199d5c91b4377860122b3db5264c5 |
|
BLAKE2b-256 | 0673a6983fa53c74a51d2578e300d055d0c8614eba40342a2e2a430381e9a4e8 |
File details
Details for the file con_log-1.0.7-py3-none-any.whl
.
File metadata
- Download URL: con_log-1.0.7-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed8f8a5a8654a38bc3e5198ecd440b72645faf97fe5b819ec1650814020b9c80 |
|
MD5 | 60b98f9e4012a184cd349f1dbdce3780 |
|
BLAKE2b-256 | a160887fb41edd9ef8d867f56a18a80693c0532d8937a21ace64fa61aa7fc4c6 |