Librería para guardar registros de errores y warnings personalizados en json
Project description
Error Visor
Que es?
Es un proyecto destinado a guardar registros personalizados en un archivo json que será utilizado más tarde para visualizarse en una app web de forma localizada y ordenada. Solo es necesaria una sentencia y listo, ya tienes el registro del error en tu app.
Cómo funciona?
Primero instalamos con:
pip install error-visor
Importamos el módulo:
import error_visor as EV
Luego localizamos el lugar desde donde queremos mandar el log. Por ejemplo un bloque exception
y
colocamos el siguiente código:
except Exception as ex:
EV.log(
EV.Error(
description='Error de muestra',
ex=ex,
priority=EV.Priority.HIGH
)
)
Para una advertencia
/warning
:
except Exception as ex:
EV.log(
EV.Warning(
description='Advertencia de muestra',
ex=ex,
follow_me=True
)
)
Y listo, tendremos el registro en un json!
CHANGELOG
v0.0.4
- Modified: Now to log should be:
EV.log(EV.Error(...))
#or
EV.log(EV.Warning(...))
- Modified: RTypes have new attr
context
. Its a merge betweenfunction
andclass
. - Fixed: Make of new log when the
logs
dir exists. The new log file wasn't created or created empty.
v0.0.3
- Fixed: Making of new
logs
dir when that not exists. Really work now! - Added: Warning Type
- Modified: RTypes have have new format to use. RTypes are like:
EV.Error
,EV.Warning
, etc.
v0.0.2
- Fixed: Making of new
logs
dir when that not exists
v0.0.1
- First upload
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
Built Distribution
File details
Details for the file error_visor-0.0.4.tar.gz
.
File metadata
- Download URL: error_visor-0.0.4.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c401c44b360e0f03b9c2fb0b78b8bd670dba64d9f4794c1cd71261b430b3159 |
|
MD5 | b47b0a1dc2373e7bc6299f33a769073a |
|
BLAKE2b-256 | 10620a31e83e1b4bd3cafc6517b4caa1306525d5593cb0ff97818351a60f752e |
File details
Details for the file error_visor-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: error_visor-0.0.4-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78953342c193c044ff55e8a0a482a3bd5a7c0759a315275e0fc3d2f197476f2e |
|
MD5 | 00c24012ca65e356c15ec4138de012d0 |
|
BLAKE2b-256 | 818656c69522f941caaf102af4340697b35272f971ecf5cb888c5b9f0f4f8ac7 |