Exceptions & Warnings

class zlogging._exc.ZeekException[source]

Bases: Exception

Base exception.

class zlogging._exc.ZeekWarning[source]

Bases: Warning

Base warning.

class zlogging._exc.ParserError(msg, lineno=None, field=None)[source]

Bases: ZeekException, ValueError

Error when parsing logs.

Parameters:
  • msg (str) – The unformatted error message.

  • lineno (Optional[int]) – The line corresponding to the failure.

  • field (Optional[str]) – The field name where parsing failed.

msg: str

The unformatted error message.

field: Optional[str]

The field name where parsing failed.

lineno: Optional[int]

The line corresponding to the failure.

class zlogging._exc.JSONParserError(msg, lineno=None, field=None)[source]

Bases: ParserError, JSONDecodeError

Error when parsing JSON log.

Parameters:
  • msg (str) – The unformatted error message.

  • lineno (Optional[int]) – The line corresponding to the failure.

  • field (Optional[str]) – The field name where parsing failed.

class zlogging._exc.ASCIIParserError(msg, lineno=None, field=None)[source]

Bases: ParserError

Error when parsing ASCII log.

Parameters:
  • msg (str) – The unformatted error message.

  • lineno (Optional[int]) – The line corresponding to the failure.

  • field (Optional[str]) – The field name where parsing failed.

class zlogging._exc.WriterError(msg, lineno=None, field=None)[source]

Bases: ZeekException, TypeError

Error when writing logs.

Parameters:
  • msg (str) – The unformatted error message.

  • lineno (Optional[int]) – The line corresponding to the failure.

  • field (Optional[str]) – The field name where parsing failed.

msg: str

The unformatted error message.

field: Optional[str]

The field name where parsing failed.

lineno: Optional[int]

The line corresponding to the failure.

class zlogging._exc.JSONWriterError(msg, lineno=None, field=None)[source]

Bases: WriterError

Error when writing JSON logs.

Parameters:
  • msg (str) – The unformatted error message.

  • lineno (Optional[int]) – The line corresponding to the failure.

  • field (Optional[str]) – The field name where parsing failed.

class zlogging._exc.ASCIIWriterError(msg, lineno=None, field=None)[source]

Bases: WriterError

Error when writing ASCII logs.

Parameters:
  • msg (str) – The unformatted error message.

  • lineno (Optional[int]) – The line corresponding to the failure.

  • field (Optional[str]) – The field name where parsing failed.

class zlogging._exc.WriterFormatError(msg, lineno=None, field=None)[source]

Bases: WriterError, ValueError

Unsupported format.

Parameters:
  • msg (str) – The unformatted error message.

  • lineno (Optional[int]) – The line corresponding to the failure.

  • field (Optional[str]) – The field name where parsing failed.

class zlogging._exc.ParserWarning[source]

Bases: ZeekWarning, UserWarning

Warning when parsing logs.

class zlogging._exc.JSONParserWarning[source]

Bases: ParserWarning

Warning when parsing logs in JSON format.

class zlogging._exc.ASCIIParserWarning[source]

Bases: ParserWarning

Warning when parsing logs in ASCII format.