This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] set logging {redirect|overwrite} warning


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]