On this page

LogSubscriber QML Type

Subscribes to rcl_interfaces::msg::Log messages — Severity level constants. More...

Import Statement: import QtRos2.RclInterfaces
Inherits:

SubscriberBase

Status: Experimental Extension

Properties

Signals

Detailed Description

These logging levels follow the Python Standard https://docs.python.org/3/library/logging.html#logging-levels And are implemented in rcutils as well https://github.com/ros2/rcutils/blob/35f29850064e0c33a4063cbc947ebbfeada11dba/include/rcutils/logging.h#L164-L172 This leaves space for other standard logging levels to be inserted in the middle in the future, as well as custom user defined levels. Since there are several other logging enumeration standard for different implementations, other logging implementations may need to provide level mappings to match their internal implementations.

LogSubscriber receives log values from a ROS 2 topic. Set the topic and node properties, then connect to the messageReceived() signal.

See also LogPublisher and log.

Property Documentation

file : string

The file field of the last received message. Updated whenever a new message arrives. fileChanged is emitted on every update.

function : string

The function field of the last received message. Updated whenever a new message arrives. functionChanged is emitted on every update.

level : uint8_t

The level field of the last received message. Updated whenever a new message arrives. levelChanged is emitted on every update.

line : uint32_t

The line field of the last received message. Updated whenever a new message arrives. lineChanged is emitted on every update.

message : log

The last message received on topic. Updated whenever a new message arrives.

msg : string

The msg field of the last received message. Updated whenever a new message arrives. msgChanged is emitted on every update.

name : string

The name field of the last received message. Updated whenever a new message arrives. nameChanged is emitted on every update.

stamp : time

The stamp field of the last received message. Updated whenever a new message arrives. stampChanged is emitted on every update.

Signal Documentation

messageReceived(log msg)

Emitted when a new log arrives on topic. msg contains the received value.

Note: The corresponding handler is onMessageReceived.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.