Make wxLogInfo() work even without wxLog::SetVerbose()

It's confusing that wxLogInfo() and wxLogVerbose() are exactly the same and
the former, and not only the latter, doesn't do anything unless SetVerbose()
had been called, even if the log level is wxLOG_Info or higher.

Fix this by checking for GetVerbose() in wxLogVerbose() only and making
wxLogInfo() check the log level only. This makes it very similar to
wxLogMessage() but this is not such a bad thing.

Also improve wxLogVerbose() documentation.
This commit is contained in:
Vadim Zeitlin
2016-03-04 15:17:35 +01:00
parent 7c32ef2ba3
commit da7388c9c8
4 changed files with 31 additions and 9 deletions

View File

@@ -1261,9 +1261,31 @@ void wxVLogMessage(const char* formatString, va_list argPtr);
/** @addtogroup group_funcmacro_log */
//@{
/**
For verbose output. Normally, it is suppressed, but might be activated if
the user wishes to know more details about the program progress (another,
but possibly confusing name for the same function could be @c wxLogInfo).
For low priority messages.
They are handled in the same way as messages logged by wxLogMessage() by
the default logger but could be handled differently by the custom loggers.
@header{wx/log.h}
*/
void wxLogInfo(const char* formatString, ... );
void wxVLogInfo(const char* formatString, va_list argPtr);
//@}
/** @addtogroup group_funcmacro_log */
//@{
/**
For verbose output.
Messages generated by these functions are suppressed by default, even if
the log level is higher than ::wxLOG_Info and need to be explicitly
activated by calling wxLog::SetVerbose().
Notice that this is done automatically by wxWidgets, unless the standard
command line handling is overridden, if @c --verbose option is specified on
the program command line, so using these functions provides a simple way of
having some diagnostic messages not shown by default but which can be
easily shown by the user if needed.
@header{wx/log.h}
*/