Logging reduction changes

Aleksander Morgado aleksander at aleksander.es
Mon Jul 26 08:20:22 UTC 2021


Hey,

>
> In libqmi:
>
> --- a/src/libqmi-glib/qmi-device.c      2021-07-22 11:04:56.971937646 -0400
> +++ b/src/libqmi-glib/qmi-device.c      2021-07-22 11:05:14.659980059 -0400
> @@ -1324,8 +1324,8 @@
>           input = qmi_message_ctl_allocate_cid_input_new ();
>           qmi_message_ctl_allocate_cid_input_set_service (input, ctx->service,
> NULL);
>
> -        g_debug ("[%s] Allocating new client ID...",
> -                 qmi_file_get_path_display (self->priv->file));
> +//        g_debug ("[%s] Allocating new client ID...",
> +//                 qmi_file_get_path_display (self->priv->file));
>           qmi_client_ctl_allocate_cid (self->priv->client_ctl,
>                                        input,
>                                        timeout,
>
>
> This message is not very interesting, since it's immediately followed by another
> message indicating the ID that was allocated (or presumably, the failure).
>

My question here would be, how is it possible that this message is
bothering you so much? It's a debug log that is generated only on
client allocation. Are you allocating and releasing new clients in a
loop or something? This should only happen on program startup or when
operation specific clients are allocated (e.g. a new WDS client during
a connection attempt).

Instead of removing it, I think we could improve it adding more
information about what type of QMI client is being allocated for
example.

>
> --- a/src/libqmi-glib/qmi-device.c      2021-06-03 12:06:40.442931910 -0400
> +++ b/src/libqmi-glib/qmi-device.c      2021-06-03 12:07:05.435047942 -0400
> @@ -346,7 +346,7 @@
>       /* If the command is not abortable, we'll return the error right away
>        * to the user. */
>       if (!__qmi_message_is_abortable (tr->message, tr->message_context)) {
> -        g_debug ("transaction 0x%x aborted, but message is not abortable",
> transaction_id);
> +        //g_debug ("transaction 0x%x aborted, but message is not abortable",
> transaction_id);
>           device_release_transaction (self, tr->wait_ctx->key);
>           transaction_complete_and_free (tr, NULL, abort_error_take);
>           g_error_free (abort_error_take);
>
> I had to suppress this.  In my testing, this would happen every 30 seconds. I
> don't know if it was some side effect or other code we were running or what.
> Sure, it's maybe interesting once, but not hundreds of times in a log:
>

I've seen this message some times, especially when unplugging a
device, as the ongoing request gets aborted because the port is gone.
Not sure why you would see this every 30s; is this maybe something
related to what you do? I think we should definitely try to understand
the root cause of the message.


-- 
Aleksander
https://aleksander.es


More information about the libqmi-devel mailing list