IPWorks MQ 2020 Python Edition

Questions / Feedback?

on_log Event

Fires once for each log message.

Syntax

class MQTTLogEventParams(object):
  @property
  def log_level() -> int: ...
  @property
  def message() -> str: ...
  @property
  def log_type() -> str: ...

# In class MQTT:
@property
def on_log() -> Callable[[MQTTLogEventParams], None]: ...
@on_log.setter
def on_log(event_hook: Callable[[MQTTLogEventParams], None]) -> None: ...

Remarks

This event fires once for each log message generated by the class. The verbosity is controlled by the LogLevel setting.

LogLevel indicates the level of the Message. Possible values are:

0 (None) No events are logged.
1 (Info - default) Informational events are logged.
2 (Verbose) Detailed data is logged.
3 (Debug) Debug data is logged.

LogType identifies the type of log entry. Possible values are:

  • Info: General information about the class.
  • Packet: Packet content logging.
  • Reconnect: Reconnection status messages.
  • Session: Session status messages.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks MQ 2020 Python Edition - Version 20.0 [Build 8162]