On Tue, Oct 11, 2016 at 09:32:51AM -0400, Damien Riegel wrote:
> On Mon, Oct 10, 2016 at 07:10:30PM -0700, Kevin J. McCarthy wrote:
> > What is happening is that if the debuglevel is less than 5, it *instead*
> > prints the above message.
> 
> Maybe you disagree, but I think that the message should not be replaced
> by another one when the log level is increased, it should be printed in
> addition to the other.

I don't feel strongly about it, but the intent to me isn't confusing or
necessarily bad: it's simply making an output substitution of the
pasword at lower levels.

The imap case could be changed as you say without any confusion.  The
pop case below is trying more directly to substitute the output, as
currently implemented it might be confusing to output both messages.

> Okay, I get the logic now. Wouldn't it be simpler if the last argument
> of pop_query_d actually was the log level required to print the query,
> and we could drop this substitution altogether.

If it were changed, I'd lean towards making it more like the IMAP code:
change "char *msg" to a "int flags" and have pop_query_d pass a flag
through indicating it's a password being sent.

The pop_query_d could adjust the debug level passed to
mutt_socket_write_d(), as in cmd_start().

> For IMAP, the pass is printed at level 5, and at level 4 and 5 for
> POP. Maybe we could also make that consistent and only display the
> password at level 5 for both?

That sounds reasonable.

-- 
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA

Attachment: signature.asc
Description: PGP signature

Reply via email to