log unknown log levels too
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2206 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -313,28 +313,27 @@ void wxLog::RemoveTraceMask(const wxString& str)
|
|||||||
|
|
||||||
void wxLog::DoLog(wxLogLevel level, const wxChar *szString, time_t t)
|
void wxLog::DoLog(wxLogLevel level, const wxChar *szString, time_t t)
|
||||||
{
|
{
|
||||||
wxString str;
|
|
||||||
|
|
||||||
switch ( level ) {
|
switch ( level ) {
|
||||||
case wxLOG_FatalError:
|
case wxLOG_FatalError:
|
||||||
DoLogString(str << _("Fatal error: ") << szString, t);
|
DoLogString(wxString(_("Fatal error: ")) + szString, t);
|
||||||
DoLogString(_("Program aborted."), t);
|
DoLogString(_("Program aborted."), t);
|
||||||
Flush();
|
Flush();
|
||||||
abort();
|
abort();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wxLOG_Error:
|
case wxLOG_Error:
|
||||||
DoLogString(str << _("Error: ") << szString, t);
|
DoLogString(wxString(_("Error: ")) + szString, t);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wxLOG_Warning:
|
case wxLOG_Warning:
|
||||||
DoLogString(str << _("Warning: ") << szString, t);
|
DoLogString(wxString(_("Warning: ")) + szString, t);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wxLOG_Info:
|
case wxLOG_Info:
|
||||||
if ( GetVerbose() )
|
if ( GetVerbose() )
|
||||||
case wxLOG_Message:
|
case wxLOG_Message:
|
||||||
DoLogString(str + szString, t);
|
default: // log unknown log levels too
|
||||||
|
DoLogString(szString, t);
|
||||||
// fall through
|
// fall through
|
||||||
|
|
||||||
case wxLOG_Status:
|
case wxLOG_Status:
|
||||||
|
Reference in New Issue
Block a user