Skip to content

gufo.err.middleware.traceback

TracebackMiddleware.

TracebackMiddleware

Bases: BaseMiddleware

Dump traceback to the gufo.err logger.

Parameters:

Name Type Description Default
format str

dumping format, one of terse, extend.

'terse'

Raises:

Type Description
ValueError

On invalid format.

Examples:

Implicit initialization of the middleware using default terse format:

from gufo.err import err

err.setup()

Implicit initialization of the middleware using explicit terse format:

from gufo.err import err

err.setup(format="terse")

Implicit initialization of the middleware using explicit extend format:

from gufo.err import err

err.setup(format="extend")

Explicit initialization of the middleware:

from gufo.err import err
from gufo.err.middleware.traceback import TracebackMiddleware

err.setup(middleware=[TracebackMiddleware(format="extend")])

process(info)

Middleware entrypoint.

Dumps stack info error log with given stack format.

Parameters:

Name Type Description Default
info ErrorInfo

ErrorInfo instance.

required