renamed wxLogXXX functions with va_list argument to wxVLogXXX

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13656 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Gilles Depeyrot 2002-01-19 15:30:39 +00:00
parent 3fe34ed0ab
commit 1d63fd6bce
4 changed files with 44 additions and 43 deletions

View File

@ -2954,39 +2954,39 @@ wxWindows errors. See also \helpref{wxError}{wxerror}.
\membersection{::wxLogError}\label{wxlogerror}
\func{void}{wxLogError}{\param{const char *}{formatString}, \param{va\_list }{argPtr}}
\func{void}{wxLogError}{\param{const char *}{formatString}, \param{...}{}}
\func{void}{wxVLogError}{\param{const char *}{formatString}, \param{va\_list }{argPtr}}
The functions to use for error messages, i.e. the messages that must be shown
to the user. The default processing is to pop up a message box to inform the
user about it.
\membersection{::wxLogFatalError}\label{wxlogfatalerror}
\func{void}{wxLogFatalError}{\param{const char *}{formatString}, \param{va\_list }{argPtr}}
\func{void}{wxLogFatalError}{\param{const char *}{formatString}, \param{...}{}}
\func{void}{wxVLogFatalError}{\param{const char *}{formatString}, \param{va\_list }{argPtr}}
Like \helpref{wxLogError}{wxlogerror}, but also
terminates the program with the exit code 3. Using {\it abort()} standard
function also terminates the program with this exit code.
\membersection{::wxLogWarning}\label{wxlogwarning}
\func{void}{wxLogWarning}{\param{const char *}{formatString}, \param{va\_list }{argPtr}}
\func{void}{wxLogWarning}{\param{const char *}{formatString}, \param{...}{}}
\func{void}{wxVLogWarning}{\param{const char *}{formatString}, \param{va\_list }{argPtr}}
For warnings - they are also normally shown to the user, but don't interrupt
the program work.
\membersection{::wxLogMessage}\label{wxlogmessage}
\func{void}{wxLogMessage}{\param{const char *}{formatString}, \param{va\_list }{argPtr}}
\func{void}{wxLogMessage}{\param{const char *}{formatString}, \param{...}{}}
\func{void}{wxVLogMessage}{\param{const char *}{formatString}, \param{va\_list }{argPtr}}
For all normal, informational messages. They also appear in a message box by
default (but it can be changed). Notice that the standard behaviour is to not
show informational messages if there are any errors later - the logic being
@ -2997,7 +2997,7 @@ meaningless.
\func{void}{wxLogVerbose}{\param{const char *}{formatString}, \param{...}{}}
\func{void}{wxLogVerbose}{\param{const char *}{formatString}, \param{va\_list }{argPtr}}
\func{void}{wxVLogVerbose}{\param{const char *}{formatString}, \param{va\_list }{argPtr}}
For verbose output. Normally, it is suppressed, but
might be activated if the user wishes to know more details about the program
@ -3005,14 +3005,14 @@ progress (another, but possibly confusing name for the same function is {\bf wxL
\membersection{::wxLogStatus}\label{wxlogstatus}
\func{void}{wxLogStatus}{\param{wxFrame *}{frame}, \param{const char *}{formatString}, \param{va\_list }{argPtr}}
\func{void}{wxLogStatus}{\param{wxFrame *}{frame}, \param{const char *}{formatString}, \param{...}{}}
\func{void}{wxLogStatus}{\param{const char *}{formatString}, \param{va\_list }{argPtr}}
\func{void}{wxVLogStatus}{\param{wxFrame *}{frame}, \param{const char *}{formatString}, \param{va\_list }{argPtr}}
\func{void}{wxLogStatus}{\param{const char *}{formatString}, \param{...}{}}
\func{void}{wxVLogStatus}{\param{const char *}{formatString}, \param{va\_list }{argPtr}}
Messages logged by these functions will appear in the statusbar of the {\it
frame} or of the top level application window by default (i.e. when using
the second version of the functions).
@ -3023,7 +3023,7 @@ If the target frame doesn't have a statusbar, the message will be lost.
\func{void}{wxLogSysError}{\param{const char *}{formatString}, \param{...}{}}
\func{void}{wxLogSysError}{\param{const char *}{formatString}, \param{va\_list }{argPtr}}
\func{void}{wxVLogSysError}{\param{const char *}{formatString}, \param{va\_list }{argPtr}}
Mostly used by wxWindows itself, but might be handy for logging errors after
system call (API function) failure. It logs the specified message text as well
@ -3040,7 +3040,7 @@ of this function takes the error code explicitly as the first argument.
\func{void}{wxLogDebug}{\param{const char *}{formatString}, \param{...}{}}
\func{void}{wxLogDebug}{\param{const char *}{formatString}, \param{va\_list }{argPtr}}
\func{void}{wxVLogDebug}{\param{const char *}{formatString}, \param{va\_list }{argPtr}}
The right functions for debug output. They only do something in debug
mode (when the preprocessor symbol \_\_WXDEBUG\_\_ is defined) and expand to
@ -3049,15 +3049,16 @@ nothing in release mode (otherwise).
\membersection{::wxLogTrace}\label{wxlogtrace}
\func{void}{wxLogTrace}{\param{const char *}{formatString}, \param{...}{}}
\func{void}{wxLogTrace}{\param{const char *}{formatString}, \param{va\_list }{argPtr}}
\func{void}{wxVLogTrace}{\param{const char *}{formatString}, \param{va\_list }{argPtr}}
\func{void}{wxLogTrace}{\param{const char *}{mask}, \param{const char *}{formatString}, \param{...}{}}
\func{void}{wxLogTrace}{\param{const char *}{mask}, \param{const char *}{formatString}, \param{va\_list }{argPtr}}
\func{void}{wxVLogTrace}{\param{const char *}{mask}, \param{const char *}{formatString}, \param{va\_list }{argPtr}}
\func{void}{wxLogTrace}{\param{wxTraceMask}{ mask}, \param{const char *}{formatString}, \param{...}{}}
\func{void}{wxLogTrace}{\param{wxTraceMask}{ mask}, \param{const char *}{formatString}, \param{va\_list }{argPtr}}
\func{void}{wxVLogTrace}{\param{wxTraceMask}{ mask}, \param{const char *}{formatString}, \param{va\_list }{argPtr}}
As {\bf wxLogDebug}, trace functions only do something in debug build and
expand to nothing in the release one. The reason for making

View File

@ -475,11 +475,11 @@ WXDLLEXPORT const wxChar* wxSysErrorMsg(unsigned long nErrCode = 0);
// -------------------
#define DECLARE_LOG_FUNCTION(level) \
extern void WXDLLEXPORT wxLog##level(const wxChar *szFormat, \
extern void WXDLLEXPORT wxVLog##level(const wxChar *szFormat, \
va_list argptr); \
extern void WXDLLEXPORT wxLog##level(const wxChar *szFormat, ...)
#define DECLARE_LOG_FUNCTION2(level, arg1) \
extern void WXDLLEXPORT wxLog##level(arg1, const wxChar *szFormat, \
extern void WXDLLEXPORT wxVLog##level(arg1, const wxChar *szFormat, \
va_list argptr); \
extern void WXDLLEXPORT wxLog##level(arg1, const wxChar *szFormat, ...)
@ -487,11 +487,11 @@ extern void WXDLLEXPORT wxLog##level(arg1, const wxChar *szFormat, ...)
// log functions do nothing at all
#define DECLARE_LOG_FUNCTION(level) \
inline void WXDLLEXPORT wxLog##level(const wxChar *szFormat, \
inline void WXDLLEXPORT wxVLog##level(const wxChar *szFormat, \
va_list argptr) {} \
inline void WXDLLEXPORT wxLog##level(const wxChar *szFormat, ...) {}
#define DECLARE_LOG_FUNCTION2(level, arg1) \
inline void WXDLLEXPORT wxLog##level(arg1, const wxChar *szFormat, \
inline void WXDLLEXPORT wxVLog##level(arg1, const wxChar *szFormat, \
va_list argptr) {} \
inline void WXDLLEXPORT wxLog##level(arg1, const wxChar *szFormat, ...) {}
@ -541,13 +541,13 @@ DECLARE_LOG_FUNCTION2(SysError, long lErrCode);
DECLARE_LOG_FUNCTION2(Trace, wxTraceMask mask);
#else //!debug
// these functions do nothing in release builds
inline void wxLogDebug(const wxChar *, va_list) { }
inline void wxVLogDebug(const wxChar *, va_list) { }
inline void wxLogDebug(const wxChar *, ...) { }
inline void wxLogTrace(const wxChar *, va_list) { }
inline void wxVLogTrace(const wxChar *, va_list) { }
inline void wxLogTrace(const wxChar *, ...) { }
inline void wxLogTrace(wxTraceMask, const wxChar *, va_list) { }
inline void wxVLogTrace(wxTraceMask, const wxChar *, va_list) { }
inline void wxLogTrace(wxTraceMask, const wxChar *, ...) { }
inline void wxLogTrace(const wxChar *, const wxChar *, va_list) { }
inline void wxVLogTrace(const wxChar *, const wxChar *, va_list) { }
inline void wxLogTrace(const wxChar *, const wxChar *, ...) { }
#endif // debug/!debug

View File

@ -111,7 +111,7 @@ static inline bool IsLoggingEnabled()
// ----------------------------------------------------------------------------
// generic log function
void wxLogGeneric(wxLogLevel level, const wxChar *szFormat, va_list argptr)
void wxVLogGeneric(wxLogLevel level, const wxChar *szFormat, va_list argptr)
{
if ( IsLoggingEnabled() ) {
wxCRIT_SECT_LOCKER(locker, gs_csLogBuf);
@ -126,12 +126,12 @@ void wxLogGeneric(wxLogLevel level, const wxChar *szFormat, ...)
{
va_list argptr;
va_start(argptr, szFormat);
wxLogGeneric(level, szFormat, argptr);
wxVLogGeneric(level, szFormat, argptr);
va_end(argptr);
}
#define IMPLEMENT_LOG_FUNCTION(level) \
void wxLog##level(const wxChar *szFormat, va_list argptr) \
void wxVLog##level(const wxChar *szFormat, va_list argptr) \
{ \
if ( IsLoggingEnabled() ) { \
wxCRIT_SECT_LOCKER(locker, gs_csLogBuf); \
@ -145,7 +145,7 @@ void wxLogGeneric(wxLogLevel level, const wxChar *szFormat, ...)
{ \
va_list argptr; \
va_start(argptr, szFormat); \
wxLog##level(szFormat, argptr); \
wxVLog##level(szFormat, argptr); \
va_end(argptr); \
}
@ -157,7 +157,7 @@ IMPLEMENT_LOG_FUNCTION(Info)
IMPLEMENT_LOG_FUNCTION(Status)
// same as info, but only if 'verbose' mode is on
void wxLogVerbose(const wxChar *szFormat, va_list argptr)
void wxVLogVerbose(const wxChar *szFormat, va_list argptr)
{
if ( IsLoggingEnabled() ) {
wxLog *pLog = wxLog::GetActiveTarget();
@ -175,14 +175,14 @@ void wxLogVerbose(const wxChar *szFormat, ...)
{
va_list argptr;
va_start(argptr, szFormat);
wxLogVerbose(szFormat, argptr);
wxVLogVerbose(szFormat, argptr);
va_end(argptr);
}
// debug functions
#ifdef __WXDEBUG__
#define IMPLEMENT_LOG_DEBUG_FUNCTION(level) \
void wxLog##level(const wxChar *szFormat, va_list argptr) \
void wxVLog##level(const wxChar *szFormat, va_list argptr) \
{ \
if ( IsLoggingEnabled() ) { \
wxCRIT_SECT_LOCKER(locker, gs_csLogBuf); \
@ -196,11 +196,11 @@ void wxLogVerbose(const wxChar *szFormat, ...)
{ \
va_list argptr; \
va_start(argptr, szFormat); \
wxLog##level(szFormat, argptr); \
wxVLog##level(szFormat, argptr); \
va_end(argptr); \
}
void wxLogTrace(const wxChar *mask, const wxChar *szFormat, va_list argptr)
void wxVLogTrace(const wxChar *mask, const wxChar *szFormat, va_list argptr)
{
if ( IsLoggingEnabled() && wxLog::IsAllowedTraceMask(mask) ) {
wxCRIT_SECT_LOCKER(locker, gs_csLogBuf);
@ -229,11 +229,11 @@ void wxLogVerbose(const wxChar *szFormat, ...)
{
va_list argptr;
va_start(argptr, szFormat);
wxLogTrace(mask, szFormat, argptr);
wxVLogTrace(mask, szFormat, argptr);
va_end(argptr);
}
void wxLogTrace(wxTraceMask mask, const wxChar *szFormat, va_list argptr)
void wxVLogTrace(wxTraceMask mask, const wxChar *szFormat, va_list argptr)
{
// we check that all of mask bits are set in the current mask, so
// that wxLogTrace(wxTraceRefCount | wxTraceOle) will only do something
@ -251,7 +251,7 @@ void wxLogVerbose(const wxChar *szFormat, ...)
{
va_list argptr;
va_start(argptr, szFormat);
wxLogTrace(mask, szFormat, argptr);
wxVLogTrace(mask, szFormat, argptr);
va_end(argptr);
}
@ -276,7 +276,7 @@ void wxLogSysErrorHelper(long lErrCode)
wxLog::OnLog(wxLOG_Error, s_szBuf, time(NULL));
}
void WXDLLEXPORT wxLogSysError(const wxChar *szFormat, va_list argptr)
void WXDLLEXPORT wxVLogSysError(const wxChar *szFormat, va_list argptr)
{
if ( IsLoggingEnabled() ) {
wxCRIT_SECT_LOCKER(locker, gs_csLogBuf);
@ -291,11 +291,11 @@ void WXDLLEXPORT wxLogSysError(const wxChar *szFormat, ...)
{
va_list argptr;
va_start(argptr, szFormat);
wxLogSysError(szFormat, argptr);
wxVLogSysError(szFormat, argptr);
va_end(argptr);
}
void WXDLLEXPORT wxLogSysError(long lErrCode, const wxChar *szFormat, va_list argptr)
void WXDLLEXPORT wxVLogSysError(long lErrCode, const wxChar *szFormat, va_list argptr)
{
if ( IsLoggingEnabled() ) {
wxCRIT_SECT_LOCKER(locker, gs_csLogBuf);
@ -310,7 +310,7 @@ void WXDLLEXPORT wxLogSysError(long lErrCode, const wxChar *szFormat, ...)
{
va_list argptr;
va_start(argptr, szFormat);
wxLogSysError(lErrCode, szFormat, argptr);
wxVLogSysError(lErrCode, szFormat, argptr);
va_end(argptr);
}

View File

@ -177,7 +177,7 @@ static wxFrame *gs_pFrame = NULL; // FIXME MT-unsafe
// accepts an additional argument which tells to which frame the output should
// be directed
void wxLogStatus(wxFrame *pFrame, const wxChar *szFormat, va_list argptr)
void wxVLogStatus(wxFrame *pFrame, const wxChar *szFormat, va_list argptr)
{
wxString msg;
@ -196,7 +196,7 @@ void wxLogStatus(wxFrame *pFrame, const wxChar *szFormat, ...)
{
va_list argptr;
va_start(argptr, szFormat);
wxLogStatus(pFrame, szFormat, argptr);
wxVLogStatus(pFrame, szFormat, argptr);
va_end(argptr);
}