Data Classes¶
Predefined Data Classes¶
Data classes for parsed logs.
-
class
zlogging._data.ASCIIInfo(path, open, close, data, exit_with_error)¶ Bases:
zlogging._data.InfoParsed log info for ASCII logs.
The ASCII log will be stored as in this
dataclass, as introduced in PEP 557.- Parameters
path (
os.PathLike) – The value is specified in the ASCII log file under# pathdirective.open (
datetime.datetime) – The value is specified in the ASCII log file under# opendirective.close (
datetime.datetime) – The value is specified in the ASCII log file under# closedirective.data (
listorModel) – The log records parsed as alistofModelper line.exit_with_error (
bool) – When exit with error, the ASCII log file doesn’t has a# closedirective.
- Return type
None
-
property
format¶ str: Log file format.
-
path: typing.PathLike = None¶ Log path.
The value is specified in the ASCII log file under
# pathdirective.- Type
os.PathLike
-
open: typing.DateTime = None¶ Log open time.
The value is specified in the ASCII log file under
# opendirective.- Type
datetime.datetime
-
close: typing.DateTime = None¶ Log close time.
The value is specified in the ASCII log file under
# closedirective.- Type
datetime.datetime
-
data: typing.List[Model] = None¶ Log records.
The log records parsed as a
listofModelper line.- Type
listofModel
-
exit_with_error: bool = None¶ Log exit with error.
When exit with error, the ASCII log file doesn’t has a
# closedirective.- Type
bool
-
class
zlogging._data.JSONInfo(data)¶ Bases:
zlogging._data.InfoParsed log info for JSON logs.
The JSON log will be stored as in this
dataclass, as introduced in PEP 557.- Parameters
data (
listofModel) – The log records parsed as alistofModelper line.- Return type
None
-
property
format¶ str: Log file format.