Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LogControl doesn't interact with --no-debug well #518

Open
evverx opened this issue Oct 31, 2024 · 1 comment
Open

LogControl doesn't interact with --no-debug well #518

evverx opened this issue Oct 31, 2024 · 1 comment

Comments

@evverx
Copy link

evverx commented Oct 31, 2024

Describe the bug
The LogControl1 API doesn't affect logs emitted by polkit when --no-debug option is removed.

To Reproduce
To reproduce it it should be enough to remove the --no-debug option and set the LogLevel to crit. polkit keeps emitting messages like

Error performing authentication: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Remote peer disconnected (g-dbus-error-quark 4)
Error cancelling authentication: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable
g_dbus_method_invocation_get_message: assertion 'G_IS_DBUS_METHOD_INVOCATION (invocation)' failed
g_dbus_message_get_unix_fd_list: assertion 'G_IS_DBUS_MESSAGE (message)' failed
16:57:03.311: Error converting subject to JS object: Process 786 terminated
Error converting subject to JS object: Process 786 terminated
Error getting process for system bus name `:1.99': GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: The connection does not exist
Error performing authentication: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable (g-dbus-error-quark 2)
Error getting process for system bus name `:1.99': GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: The connection does not exist
Error cancelling authentication: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable
Error cancelling authentication: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable
Error calling GetUnitByPIDFD: GDBus.Error:org.freedesktop.DBus.Error.UnixProcessIdUnknown: Failed to get PID from PIDFD: No such process
g_error_free: assertion 'error != NULL' failed
Process 786 terminated
g_error_free: assertion 'error != NULL' failed
g_error_free: assertion 'error != NULL' failed
g_error_free: assertion 'error != NULL' failed

Expected behavior
polkit should emit only critical messages (and the TRANSPORT should probably be syslog since the LogTarget property says that it all goes to syslog.

It was also discussed in #506 (comment)

@evverx
Copy link
Author

evverx commented Oct 31, 2024

FWIW I agree with #425 (comment) that ideally --no-debug shouldn't be necessary. polkit could emit info messages by default and the LogLevel property could be used to control all the logs (by analogy with what all the systemd services do for example).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant