From: Grant Erickson <gerickson@nuovations.com>
To: Denis Kenzior <denkenz@gmail.com>
Cc: connman@lists.linux.dev
Subject: Re: [PATCH 1/2] service: Make log output of 'online_check_is_enabled_check' consistent.
Date: Fri, 22 Dec 2023 10:31:15 -0800 [thread overview]
Message-ID: <66532F49-1D68-4333-8F50-9EDE845E7AA4@nuovations.com> (raw)
In-Reply-To: <22f2e328-ee23-4086-bc78-d2ce6c52303c@gmail.com>
On Dec 22, 2023, at 10:23 AM, Denis Kenzior <denkenz@gmail.com> wrote:
>> @@ -2195,9 +2195,17 @@ static void cancel_online_check(struct connman_service *service,
>> static bool online_check_is_enabled_check(
>> const struct connman_service *service)
>> {
>> + g_autofree char *interface = NULL;
>> +
>> if (!__connman_service_is_online_check_enabled()) {
>> - connman_info("Online check disabled. "
>> - "Default service remains in READY state.");
>> + interface = connman_service_get_interface(service);
>> +
>> + connman_info("Online check disabled; "
>> + "interface %s [ %s ] remains in %s state.",
>> + interface,
>> + __connman_service_type2string(service->type),
>> + state2string(CONNMAN_SERVICE_STATE_READY));
>> +
>
> Does it make sense to add a specific method for such informational prints that will enforce the desired formatting pattern instead of relying on human intervention?
Denis,
It’s a great point and one I’d considered. The scope of my changes seemed to small / narrow at that / this juncture. As we review logging across modules and the project at large and there’s an emergent pattern, I’m all for such a function / method.
Best,
Grant
--
Principal
Nuovations
gerickson@nuovations.com
http://www.nuovations.com/
next prev parent reply other threads:[~2023-12-22 18:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-21 7:33 [PATCH 0/2] service: Improve Logging and Event Visibility at the Info Level Grant Erickson
2023-12-21 7:33 ` [PATCH 1/2] service: Make log output of 'online_check_is_enabled_check' consistent Grant Erickson
2023-12-22 18:23 ` Denis Kenzior
2023-12-22 18:31 ` Grant Erickson [this message]
2023-12-21 7:33 ` [PATCH 2/2] service: Log service default, error, and state changes Grant Erickson
-- strict thread matches above, loose matches on Subject: below --
2023-12-23 18:58 [PATCH 0/2] service: Improve Logging and Event Visibility at the Info Level Grant Erickson
2023-12-23 18:58 ` [PATCH 1/2] service: Make log output of 'online_check_is_enabled_check' consistent Grant Erickson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=66532F49-1D68-4333-8F50-9EDE845E7AA4@nuovations.com \
--to=gerickson@nuovations.com \
--cc=connman@lists.linux.dev \
--cc=denkenz@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).