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.Logger.err(
EV.Error(
description='Error de muestra',
ex=ex,
priority=EV.Priority.HIGH
)
)
Para una advertencia
/warning
:
except Exception as ex:
EV.Logger.warn(
EV.Warning(
description='Advertencia de muestra',
ex=ex,
follow_me=True
)
)
Y listo, tendremos el registro en un json!
CHANGELOG
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
error_visor-0.0.3.tar.gz
(3.5 kB
view hashes)
Built Distribution
Close
Hashes for error_visor-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68f5164d1aa5bde2d7391e070eaef1399f5a0e9041e45f633d4a69ffb02b5684 |
|
MD5 | ab9d4ffdbf94eb01f93f5421a7b5b23b |
|
BLAKE2b-256 | 2cf0b2559b980e692ed6c3f60ef828c9ba0b333fdb58a2467377775bb32bcfb3 |