public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: Luis Machado <luis.machado@linaro.org>,
	gdb-patches@sourceware.org, Eli Zaretskii <eliz@gnu.org>
Subject: Re: [pushed] [gdb/cli] Add command: show logging active
Date: Wed, 24 Nov 2021 11:32:37 +0100	[thread overview]
Message-ID: <ae627eb0-b11c-cf4b-b02d-cbe90999a46b@suse.de> (raw)
In-Reply-To: <72143ae1-7b7f-7359-2e4a-ca74142194b9@linaro.org>

On 11/23/21 1:56 PM, Luis Machado wrote:
> On 11/23/21 9:49 AM, Luis Machado wrote:
>> On 11/23/21 8:46 AM, Tom de Vries via Gdb-patches wrote:
>>> Currently, there's no gdb command that shows whether logging is
>>> enabled or
>>> disabled.
>>>
>>> There's the show logging command, but output is identical in both cases.
>>> With logging disabled, we have:
>>> ...
>>> (gdb) set logging off
>>> (gdb) show logging
>>> logging debugredirect:  The logging output mode is off.
>>> logging file:  The current logfile is "gdb.txt".
>>> logging overwrite: \
>>>    Whether logging overwrites or appends to the log file is off.
>>> logging redirect:  The logging output mode is off.
>>> ...
>>> and with logging enabled we have:
>>> ...
>>> (gdb) set logging on
>>> Copying output to gdb.txt.
>>> Copying debug output to gdb.txt.
>>> (gdb) show logging
>>> logging debugredirect:  The logging output mode is off.
>>> logging file:  The current logfile is "gdb.txt".
>>> logging overwrite: \
>>>    Whether logging overwrites or appends to the log file is off.
>>> logging redirect:  The logging output mode is off.
>>> ...
>>>
>>> Add a "show logging active" command, such that we have:
>>> ...
>>> (gdb) show logging
>>> logging active:  Logging is disabled.
>>> logging debugredirect:  The logging output mode is off.
>>> logging file:  The current logfile is "gdb.txt".
>>> logging overwrite: \
>>>    Whether logging overwrites or appends to the log file is off.
>>> logging redirect:  The logging output mode is off.
>>> ...
>>
>> Sorry, I think these phrases need a revamp. The current text is very
>> confusing. I've cc-ed Eli for some feedback on documentation.
>>
>> "logging active:  Logging is disabled." reads very funny. Is logging
>> active? Or is it disabled? Why can't it say "Logging is active" or
>> "Logging is not active"?
>>
>> I think the same goes to some of the other lines.
>>
>> * "logging debugredirect:  The logging output mode is off."
>>
>> Why not say "Debug is not being redirected." or "Debug is being
>> redirected."?
>>
>> * "logging overwrite: Whether logging overwrites or appends to the log
>> file is off."
>>
>> Why not say "Logging overwrites contents of the log file" or "Logging
>> appends to the log file".
>>
>> * "logging redirect:  The logging output mode is off."
>>
>> I find the above cryptic as well. Why not "Log redirects <something>".
> 
> I just noticed these messages changed relatively recently. An older GDB
> would show the following:
> 
> Future logs will be written to gdb.txt.
> Logs will be appended to the log file.
> Output will be logged and displayed.
> Debug output will be logged and displayed.
> 
> The above is much clearer in my opinion. The newer ones seem very
> cryptic. It almost looks like a documentation regression, though I can
> understand that the code is probably simpler.

I've tried to address these issues here (
https://sourceware.org/pipermail/gdb-patches/2021-November/183750.html ).

Thanks,
- Tom

      reply	other threads:[~2021-11-24 10:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-23 11:46 Tom de Vries
2021-11-23 11:49 ` [PATCH] " Tom de Vries
2021-11-23 12:30   ` Lancelot SIX
2021-11-24 10:31     ` Tom de Vries
2021-11-23 13:00   ` Eli Zaretskii
2021-11-24 10:41     ` Tom de Vries
2021-11-24 13:03       ` Eli Zaretskii
2021-11-23 13:30   ` Simon Marchi
2021-11-24 11:06     ` Tom de Vries
2021-11-23 12:49 ` [pushed] " Luis Machado
2021-11-23 12:56   ` Luis Machado
2021-11-24 10:32     ` Tom de Vries [this message]

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=ae627eb0-b11c-cf4b-b02d-cbe90999a46b@suse.de \
    --to=tdevries@suse.de \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=luis.machado@linaro.org \
    /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).