Camper-Logger-Exception
Simple, pretty and powerful logger and exception Catcher for python
This library has been developed to make it easier to detect errors in the application,
and to make the process easier.
Also , More regular display of logs used in the application, allows saving to local file
Install
(For use 3.4+)
pip install Camper-Logger-Exception
Using Logger
from Camper.Log import CamperLogger
logger = CamperLogger(logger_name=__name__, debug=True, record=True, log_path="/usr/log")
logger_name : Logger name for application or class - Required
debug : Debug Mode True or False (default False) - Optional
log_path : The path of the saved log file (default project folder ) - Optional
record : If it is called True, it saves the records to the file. (default False ) - Optional
Usage :
logger.error(message="test")
logger.warning(message="test")
logger.info(message="test")
Using Exception Catcher
from Camper.ExceptionCatcher import CamperException
@CamperException.exception_catcher(default=5,record=True)
def example(value):
#do something here
default : if If the function receives an error, the value to return. (default None) - Optional
default_callback : Sends the default value to the specified function. - Optional
error_callback : Sends the error message to the specified function. - Optional
log_path : The path of the saved log file (default project folder ) - Optional
record : If it is called True, it saves the records to the file. - Optional
post_endpoint : If post_endpoint is added, it will post the message text to the url. (Post Payload {"error":" Error message"}) - Optional
extra_data : Extra data added to post_endpoint (key extra) - Optional
Contribute:
Send me more features if you want it
We need your Help to become it to better.
EDIT:
07-16-2019 : Add Sentry Capture Exception Feature for using - CamperException(sentry_dns="http://xxxxx.sentry.io/xxxxx")
Contact:
Metadata
Release files for Camper-Logger-Exception 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| Camper-Logger-Exception-0.2.0.tar.gz | 3.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| Camper_Logger_Exception-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.6 kB
Release files / Camper-Logger-Exception-0.2.0.tar.gz
| Download URL | Camper-Logger-Exception-0.2.0.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a2c2f15c831eb9680dc37e477282a04a601b9527720c1f388a6eb3f772e93707
|
|
BLAKE2b-256 checksum How to use checksums |
7cd45d697a570e1aa905e3549ba98bb19bfadd84be207fd117800d29bab24d13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.11.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.7
|
Release files / Camper_Logger_Exception-0.2.0-py3-none-any.whl
| Download URL | Camper_Logger_Exception-0.2.0-py3-none-any.whl |
|---|---|
| Size | 16.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cd44aee4cf962f3cd9822e2f7cd69a5edb573960eb59ca2e8a844a482f4a2db9
|
|
BLAKE2b-256 checksum How to use checksums |
357612300269fcba1ff57da05837e369c284411db68514871450fa0273398310
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.11.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.7
|