Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Jan Kratochvil <jan.kratochvil@redhat.com>
Subject: Re: [patch] set logging {redirect|overwrite} warning
Date: Thu, 12 Aug 2010 16:07:00 -0000	[thread overview]
Message-ID: <201008121707.46348.pedro@codesourcery.com> (raw)
In-Reply-To: <20100806182919.GA3654@host1.dyn.jankratochvil.net>

On Friday 06 August 2010 19:29:19, Jan Kratochvil wrote:

> (gdb) set logging on
> Copying output to gdb.txt.
> (gdb) set logging redirect 
> Already logging to gdb.txt.  You should turn the logging off and on to make the new setting effective.

This is fine with me.  "set logging redirect" could take affect on
the fly; "set logging overwrite", not so clear.

> +static void
> +set_logging_overwrite (char *args, int from_tty, struct cmd_list_element *c)
> +{
> +  if (saved_filename)
> +    fprintf_unfiltered (gdb_stdout, _("Already logging to %s.  You should "
> +				      "turn the logging off and on to make "
> +				      "the new setting effective.\n"),
> +			saved_filename);

Any reason to not use "warning" instead of "fprintf_unfiltered"?
(if you switch, remember to drop \n).

I'd suggest s/Already/Currently/ and s/You should//.

Since there's more than one place with the same string, it'd be nice
to abstract that out to a "warn_reenable_logging_to_take_effect"
function, or some such.

-- 
Pedro Alves


  reply	other threads:[~2010-08-12 16:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-06 18:29 Jan Kratochvil
2010-08-12 16:07 ` Pedro Alves [this message]
2010-08-13 21:56   ` Jan Kratochvil
2010-09-02 15:21     ` ping: " Jan Kratochvil
2010-09-02 15:36       ` Pedro Alves
2010-09-02 16:51         ` Jan Kratochvil

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=201008121707.46348.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.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