Skip to main content

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.6

  • Fixed: Package .whl has the wrong uploaded

v0.0.5

  • Added: printable function to EV.log() -> It prints the status of the log to save
  • Fixed: When we pass an Exception with args, it raises a JSONDecodeError!

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 between function and class.
  • 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

error_visor-0.0.6.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

error_visor-0.0.6-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file error_visor-0.0.6.tar.gz.

File metadata

  • Download URL: error_visor-0.0.6.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for error_visor-0.0.6.tar.gz
Algorithm Hash digest
SHA256 b0181136e2d663dc430b7e031ed592011af0867a8c5a1da35b32a95bbb50c5ff
MD5 a7b8709b2e1cbeb939da753e29ddf9dc
BLAKE2b-256 d500028a77df4c14c7abd380d95da5b6c0a4d65ab28703d3fa4bc6a4afff277a

See more details on using hashes here.

File details

Details for the file error_visor-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: error_visor-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for error_visor-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 3698589497b06c125dd27e1cfe1b802bafbd50dcccd29b1da123be5357f22ecc
MD5 dc4508bd5fc96d8f2daabe4a303167cf
BLAKE2b-256 7c80a809327f1c60e02519a48ac522a60689c6b0b6c3139aa353fb899049d912

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page