Skip to content

logs an error and traceback when some other program requests an unknown property #165

Open
@foresto

Description

@foresto

When some other program on the bus tries to access a nonexistent property on a dbus-next service, BaseMessageBus currently raises an exception, and handles it by writing both a log message and a stack trace at the ERROR log level.

For example:

got unexpected error processing a message: interface "org.kde.StatusNotifierItem" does not have property "IconThemePath".
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/dbus_next/message_bus.py", line 621, in _on_message
    self._process_message(msg)
  File "/usr/lib/python3/dist-packages/dbus_next/message_bus.py", line 712, in _process_message
    handler(msg, send_reply)
  File "/usr/lib/python3/dist-packages/dbus_next/message_bus.py", line 898, in _default_properties_handler
    raise DBusError(
dbus_next.errors.DBusError: interface "org.kde.StatusNotifierItem" does not have property "IconThemePath"

That's a lot of noise to have spamming my application's (and users') logs. I could silence it by disabling all dbus-next logs below CRITICAL, but then I would miss any legitimate errors if they come up.

Since an external program requesting an invalid property is not a bug in the program using dbus-next, shouldn't the log message be downgraded to DEBUG or INFO level? And shouldn't the stack trace be removed entirely?

And, if the library is going to log anything, shouldn't it also log which dbus sender tried to access the nonexistent property?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions