Skip to content

gufo.err.middleware.errorinfo

ErrorInfo middleware.

ErrorInfoMiddleware

Bases: BaseMiddleware

Dump error to JSON file.

Use err tool to manipulate collected files.

Parameters:

Name Type Description Default
path str

Path to directory to write error info.

required
compress Optional[str]

Compression algorithm. One of:

  • None - do not compress
  • gz - GZip
  • bz2 - BZip2
  • xz - LZMA/xz
None

Raises:

Type Description
ValueError

If path is not writable.

Examples:

from gufo.err import err

err.setup(error_info_path="/var/err/", error_info_compress="gz")

process(info)

Middleware entrypoing.

Parameters:

Name Type Description Default
info ErrorInfo

ErrorInfo instance.

required