Exemplo n.º 1
0
void wxLogBalloon::DoLogTextAtLevel(wxLogLevel level, const wxString& msg)
{
    switch (level)
    {
        case wxLOG_FatalError:
            DoLogText(_("Fatal error: ") + msg + _("Program aborted."), wxICON_ERROR);
            abort();
            break;
            
        case wxLOG_Error:
            DoLogText(msg, wxICON_ERROR);
            break;
            
        case wxLOG_Warning:
            DoLogText(msg, wxICON_WARNING);
            break;
            
        case wxLOG_Status:
            DoLogStatus(msg);
            break;
            
        case wxLOG_Info:
        case wxLOG_Message:
        default:    // log unknown log levels too
            if (wxGetApp().Config.BalloonsEnabled())
                DoLogText(msg);
            break;
            
        case wxLOG_Trace:
        case wxLOG_Debug:
#ifdef __WXDEBUG__
            {
                wxString qualifiedMsg = level == wxLOG_Trace ? wxT("Trace: ")
                : wxT("Debug: ");
                qualifiedMsg << msg;
                DoLogText(qualifiedMsg);
            }
#endif // Debug
            break;
    }
}
Exemplo n.º 2
0
void wxLog::DoLogTextAtLevel(wxLogLevel level, const wxString& msg)
{
    // we know about debug messages (because using wxMessageOutputDebug is the
    // right thing to do in 99% of all cases and also for compatibility) but
    // anything else needs to be handled in the derived class
    if ( level == wxLOG_Debug || level == wxLOG_Trace )
    {
        wxMessageOutputDebug().Output(msg + wxS('\n'));
    }
    else
    {
        DoLogText(msg);
    }
}
Exemplo n.º 3
0
void AudacityLogger::OnClear(wxCommandEvent & WXUNUSED(e))
{
   mBuffer = wxEmptyString;
   DoLogText(wxT("Log Cleared."));
}