lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] NDEBUG


From: Vadim Zeitlin
Subject: Re: [lmi] NDEBUG
Date: Thu, 4 Dec 2014 22:22:54 +0100

On Wed, 29 Oct 2014 18:51:49 +0000 Greg Chicares <address@hidden> wrote:

GC> On 2014-10-27 18:32Z, Vadim Zeitlin wrote:
GC> [...]
GC> >  We can use wxIsDebuggerRunning(), which is just a wrapper for
GC> > IsDebuggerPresent(), but doesn't require including <windows.h> directly.
GC> > 
GC> >  To summarize, I think setting wxLogStderr as active log target only if
GC> > wxIsDebuggerRunning() returns false is indeed the best solution.
GC> 
GC> Committed 20141029T1839Z, revision 6007.

 Sorry to return to this, but I'm afraid I was wrong above when I wrote
that this change was the best solution -- and that it was wrong to make it.

 In fact, the problem was that I lost from sight the problem we were trying
to find the solution for. AFAICS it was originally formulated here:

On Sun, 26 Oct 2014 16:29:58 +0000 Greg Chicares <address@hidden> wrote:

GC> While lmi is running, wx potentially generates diagnostic messages. Only
GC> the most severe messages are displayed; others aren't by default, because
GC> they would perplex end users. Yet all these diagnostics are potentially
GC> helpful to me, as they may indicate latent defects, so I would like to
GC> be able to see them all myself. And that's the entire goal.

 I.e. the goal was to see the diagnostic messages not shown by default.
However the effects of the change of r6007 are almost exactly the converse:
by setting the active log target to wxLogStderr, it ensures that the end
users do not see even the severe messages any more!

 Somehow this goal has been replaced with the one of finding a way to send
the messages to stderr only when not running under a debugger later, but
this doesn't seem to have been intentional. At least I don't see at any
point a conscious decision being made about stopping showing the errors
inside wxWidgets, which are shown using wxLogXXX() functions, to the user.
Yet, again, this is what r6007 did.

 So I believe this change was wrong and the correct change would be to
define a custom log target sending the normally user visible logs (i.e.
starting from severity wxLOG_Info) to wxLogGui, as usual, while sending the
debug logs to stderr and/or debugger output under Windows. Do you agree
with this? If so, I can quickly make a patch implementing this behaviour.

 Thanks,
VZ

reply via email to

[Prev in Thread] Current Thread [Next in Thread]