Skip to content

Exceptions

Exception classes specific to syslogformat.

SyslogFormatError

Bases: Exception

Base class for all exceptions in the syslogformat package.

NonStandardSyslogFacility

Bases: ValueError, SyslogFormatError

Used when a syslog facility code does not pass standard validation.

__init__

__init__(facility: int) -> None

Initialized with the wrong facility code that was used.

InvalidLogLevel

Bases: SyslogFormatError

Used when a log level is not an integer and not a registered name.

__init__

__init__(value: object) -> None

Initialized with the faulty log level.

CodeShouldBeUnreachable

Bases: AssertionError, SyslogFormatError

Convenience for marking lines of code as presumably unreachable.