Logger
Logger is a Python package that makes logging easy
Installation
pip install loggerpyth
Get Started
Info, Warning, Success
Every method takes in an area, a message and an option loc which represents the current line of code, it can be got by using 'Logger.line()' or by passing an integer
from Logger.Logger import Logger
Logger.info(area='Main', message='This is an info',
loc=Logger.line())
Logger.warning(area='Main', message='This is a warning',
loc=Logger.line())
Logger.success(area='Main', message='This is a success',
loc=Logger.line())
Output
Error
The error method provides an exception that can be passed by the user with a message or it will be the default 'Exception' raised with an empty string
default
Logger.error(area='Main', message='Error',loc=Logger.line())
custom error
Logger.error(area='Main', message='Error',
error=Logger.Err(ValueError, 'msg'),loc=Logger.line())
You can also perform and check operation (of two types)
Operation
It will be 'raised' a success if the operation goes as it should, a warning otherwise
Logger.operation(name='Sum', result=2+2, expected_result=5)
Logger.operation(name='Sum', result=2+2, expected_result=4)
Debug
It will be 'raised' a success if the operation goes as it should, an error otherwise
Logger.debug(name='Sum', result=2+2, expected_result=5,
error=Logger.Err(ValueError, 'msg'))
Logger.debug(name='Sum', result=2+2, expected_result=4,
error=Logger.Err(ValueError, 'msg'))
Github: https://github.com/Bilodev/
Release files for loggerpyth 1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| loggerpyth-1.3-py3-none-any.whl | Python 3 | none | any | Details |
Release files / loggerpyth-1.3-py3-none-any.whl
| Download URL | loggerpyth-1.3-py3-none-any.whl |
|---|---|
| Size | 3.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3a246431cc67002302f745baf85064745af2594a4d64842429b28b2a08c2df70
|
|
BLAKE2b-256 checksum How to use checksums |
1c90b08055135334747ca2a89a212aefcd4a6e151ca73eeaa609425a44b7d3d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.7
|