[Spice-devel] [vdagent-linux v2 3/6] console-kit: save verbosity level for debugging
Jonathon Jongsma
jjongsma at redhat.com
Wed Apr 27 19:41:36 UTC 2016
It appears that the systemd implementation of session-info uses LOG_INFO instead
of LOG_DEBUG. Probably best to be consistent.
Reviewed-by: Jonathon Jongsma <jjongsma at redhat.com>
On Sat, 2016-04-23 at 12:27 +0200, Victor Toso wrote:
> ---
> src/console-kit.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/src/console-kit.c b/src/console-kit.c
> index c45f662..fc73cf2 100644
> --- a/src/console-kit.c
> +++ b/src/console-kit.c
> @@ -32,6 +32,7 @@ struct session_info {
> int fd;
> char *seat;
> char *active_session;
> + int verbose;
> };
>
> #define INTERFACE_CONSOLE_KIT "org.freedesktop.ConsoleKit"
> @@ -55,6 +56,8 @@ struct session_info *session_info_create(int verbose)
> if (!si)
> return NULL;
>
> + si->verbose = verbose;
> +
> dbus_error_init(&error);
> si->connection = dbus_bus_get_private(DBUS_BUS_SYSTEM, &error);
> if (si->connection == NULL || dbus_error_is_set(&error)) {
> @@ -172,6 +175,8 @@ exit:
> dbus_message_unref(message);
> }
>
> + if (si->verbose)
> + syslog(LOG_DEBUG, "(console-kit) seat: %s", si->seat);
> return si->seat;
> }
>
> @@ -360,5 +365,9 @@ static char
> *console_kit_check_active_session_change(struct session_info *si)
> dbus_connection_read_write(si->connection, 0);
> }
>
> + if (si->verbose)
> + syslog(LOG_DEBUG, "(console-kit) active-session: '%s'",
> + (si->active_session ? si->active_session : "None"));
> +
> return si->active_session;
> }
More information about the Spice-devel
mailing list