* [PATCH 0/5] hwclock: clean up messages
@ 2014-10-24 2:44 JWP
2014-10-24 11:08 ` Karel Zak
0 siblings, 1 reply; 7+ messages in thread
From: JWP @ 2014-10-24 2:44 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux
This patch set cleans up various message output.
It contains cosmetic changes only.
J William Piggott (5):
hwclock: Remove newline from 'date' debug output
hwclock: clean up message periods/full stops
hwclock: add message line breaks
hwclock: Fix --date debug messages
hwclock: version prints out of order
sys-utils/hwclock.c | 145 ++++++++++++++++++++++++++--------------------------
1 file changed, 73 insertions(+), 72 deletions(-)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/5] hwclock: clean up messages
2014-10-24 2:44 [PATCH 0/5] hwclock: clean up messages JWP
@ 2014-10-24 11:08 ` Karel Zak
2014-10-24 11:15 ` JWP
2014-10-24 11:48 ` Benno Schulenberg
0 siblings, 2 replies; 7+ messages in thread
From: Karel Zak @ 2014-10-24 11:08 UTC (permalink / raw)
To: JWP; +Cc: util-linux
On Thu, Oct 23, 2014 at 10:44:31PM -0400, JWP wrote:
> This patch set cleans up various message output.
> It contains cosmetic changes only.
>
> J William Piggott (5):
> hwclock: Remove newline from 'date' debug output
> hwclock: clean up message periods/full stops
> hwclock: add message line breaks
> hwclock: Fix --date debug messages
> hwclock: version prints out of order
I'm going to merge these patches, but as a long term solution it would
better to use include/debug.h stuff (see for example
misc-utils/whereis.c or libmount/src/init.c).
The debug.h provides more elegant way for debug messages. It's
possible to define mask to specify wanted messages and all is
controlled by <NAME>_DEBUG= env. variable etc.
It's probably too verbose for hwclock --debug, but let's ignore this
problem for now. I'll make the output more user friendly ASAP.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/5] hwclock: clean up messages
2014-10-24 11:08 ` Karel Zak
@ 2014-10-24 11:15 ` JWP
2014-10-24 11:48 ` Benno Schulenberg
1 sibling, 0 replies; 7+ messages in thread
From: JWP @ 2014-10-24 11:15 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux
On 10/24/2014 07:08 AM, Karel Zak wrote:
> On Thu, Oct 23, 2014 at 10:44:31PM -0400, JWP wrote:
>> This patch set cleans up various message output.
>> It contains cosmetic changes only.
>>
>> J William Piggott (5):
>> hwclock: Remove newline from 'date' debug output
>> hwclock: clean up message periods/full stops
>> hwclock: add message line breaks
>> hwclock: Fix --date debug messages
>> hwclock: version prints out of order
>
> I'm going to merge these patches, but as a long term solution it would
> better to use include/debug.h stuff (see for example
> misc-utils/whereis.c or libmount/src/init.c).
>
> The debug.h provides more elegant way for debug messages. It's
> possible to define mask to specify wanted messages and all is
> controlled by <NAME>_DEBUG= env. variable etc.
>
> It's probably too verbose for hwclock --debug, but let's ignore this
> problem for now. I'll make the output more user friendly ASAP.
Cool, I was not aware of debug.h. I will check it out and include it
in my hwclock refactoring todo notes.
>
> Karel
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/5] hwclock: clean up messages
2014-10-24 11:08 ` Karel Zak
2014-10-24 11:15 ` JWP
@ 2014-10-24 11:48 ` Benno Schulenberg
2014-10-24 12:18 ` Karel Zak
2014-10-24 12:22 ` JWP
1 sibling, 2 replies; 7+ messages in thread
From: Benno Schulenberg @ 2014-10-24 11:48 UTC (permalink / raw)
To: Karel Zak; +Cc: JWP, Util-Linux
On Fri, Oct 24, 2014, at 13:08, Karel Zak wrote:
> On Thu, Oct 23, 2014 at 10:44:31PM -0400, JWP wrote:
> > This patch set cleans up various message output.
> > It contains cosmetic changes only.
> >
> > J William Piggott (5):
> > hwclock: Remove newline from 'date' debug output
> > hwclock: clean up message periods/full stops
> > hwclock: add message line breaks
> > hwclock: Fix --date debug messages
> > hwclock: version prints out of order
>
> I'm going to merge these patches,
Please no. Not the mere period and linebreak changes.
> but as a long term solution it would
> better to use include/debug.h stuff (see for example
> misc-utils/whereis.c or libmount/src/init.c).
In hwclock the "debug" messages are gettextized, because in fact
they are verbose messages to help the user understand what hwclock
is doing. They are not meant to find programming errors in hwclock;
if that were the case, they wouldn't be gettextized, because a
programmer needs to be able to read an write English anyway.
Benno
--
http://www.fastmail.fm - Does exactly what it says on the tin
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/5] hwclock: clean up messages
2014-10-24 11:48 ` Benno Schulenberg
@ 2014-10-24 12:18 ` Karel Zak
2014-10-24 12:22 ` JWP
1 sibling, 0 replies; 7+ messages in thread
From: Karel Zak @ 2014-10-24 12:18 UTC (permalink / raw)
To: Benno Schulenberg; +Cc: JWP, Util-Linux
On Fri, Oct 24, 2014 at 01:48:33PM +0200, Benno Schulenberg wrote:
>
> On Fri, Oct 24, 2014, at 13:08, Karel Zak wrote:
> > On Thu, Oct 23, 2014 at 10:44:31PM -0400, JWP wrote:
> > > This patch set cleans up various message output.
> > > It contains cosmetic changes only.
> > >
> > > J William Piggott (5):
> > > hwclock: Remove newline from 'date' debug output
> > > hwclock: clean up message periods/full stops
> > > hwclock: add message line breaks
> > > hwclock: Fix --date debug messages
> > > hwclock: version prints out of order
> >
> > I'm going to merge these patches,
>
> Please no. Not the mere period and linebreak changes.
Thanks for review, that's reason why I usually wait at least a day..
:-)
> > but as a long term solution it would
> > better to use include/debug.h stuff (see for example
> > misc-utils/whereis.c or libmount/src/init.c).
>
> In hwclock the "debug" messages are gettextized, because in fact
ah..
> they are verbose messages to help the user understand what hwclock
> is doing. They are not meant to find programming errors in hwclock;
> if that were the case, they wouldn't be gettextized, because a
> programmer needs to be able to read an write English anyway.
Good point, then it would be better to keen --debug independent on
HWCLOCK_DEBUG=.
But I still think that for so complex tool like hwclock we need a
real debug output for developers / bug reporters. The current --debug
is more like --verbose we have in another tools.
Larel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/5] hwclock: clean up messages
2014-10-24 11:48 ` Benno Schulenberg
2014-10-24 12:18 ` Karel Zak
@ 2014-10-24 12:22 ` JWP
2014-10-24 13:18 ` Benno Schulenberg
1 sibling, 1 reply; 7+ messages in thread
From: JWP @ 2014-10-24 12:22 UTC (permalink / raw)
To: Benno Schulenberg, Karel Zak; +Cc: Util-Linux
On 10/24/2014 07:48 AM, Benno Schulenberg wrote:
>
> On Fri, Oct 24, 2014, at 13:08, Karel Zak wrote:
>> On Thu, Oct 23, 2014 at 10:44:31PM -0400, JWP wrote:
>
> In hwclock the "debug" messages are gettextized, because in fact
> they are verbose messages to help the user understand what hwclock
> is doing. They are not meant to find programming errors in hwclock;
> if that were the case, they wouldn't be gettextized, because a
> programmer needs to be able to read an write English anyway.
I would agree that it should have been named --verbose. However, I
have not suggested it because of Util-linux guidelines:
>From util-linux//Documentation/howto-usage-function.txt
"The rule of thumb with other options is that once they exist, you may
not change them, nor change how they work, nor remove them."
The --debug output is useful for testing and debugging, as I have
used it as such many times.
>
> Benno
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/5] hwclock: clean up messages
2014-10-24 12:22 ` JWP
@ 2014-10-24 13:18 ` Benno Schulenberg
0 siblings, 0 replies; 7+ messages in thread
From: Benno Schulenberg @ 2014-10-24 13:18 UTC (permalink / raw)
To: JWP; +Cc: Karel Zak, Util-Linux
On Fri, Oct 24, 2014, at 14:22, JWP wrote:
> I would agree that it should have been named --verbose. However, I
> have not suggested it because of Util-linux guidelines:
>
> From util-linux//Documentation/howto-usage-function.txt
>
> "The rule of thumb with other options is that once they exist, you may
> not change them, nor change how they work, nor remove them."
Sure. But that does not mean you cannot add a synonym for --debug,
say --verbose, and document it, and undocument the original --debug
(but still recognize it and act upon it, just like in hwclock -v is
still recognized as a synonym of -V). And then in a couple of years
print a deprecation warning when --debug is used, and then remove it
another two years later.
When you are going to refactor hwclock, many messages are going to
change anyway, and if anyone has become dependent on the --debug
messages, they will have to modify their scripts anyway; it will
then be a small trouble to change --debug to --verbose. The rule
of thumb is mainly for options that people tend to use in scripts;
you don't want to break those without a very good reason.
Benno
--
http://www.fastmail.fm - One of many happy users:
http://www.fastmail.fm/help/overview_quotes.html
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-10-24 13:18 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-24 2:44 [PATCH 0/5] hwclock: clean up messages JWP
2014-10-24 11:08 ` Karel Zak
2014-10-24 11:15 ` JWP
2014-10-24 11:48 ` Benno Schulenberg
2014-10-24 12:18 ` Karel Zak
2014-10-24 12:22 ` JWP
2014-10-24 13:18 ` Benno Schulenberg
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 NNTP newsgroup(s).