2008-08-06 18:36:30 +00:00
|
|
|
// This file is part of BOINC.
|
2005-02-01 00:54:06 +00:00
|
|
|
// http://boinc.berkeley.edu
|
2008-08-06 18:36:30 +00:00
|
|
|
// Copyright (C) 2008 University of California
|
2005-02-01 00:54:06 +00:00
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// BOINC is free software; you can redistribute it and/or modify it
|
|
|
|
// under the terms of the GNU Lesser General Public License
|
|
|
|
// as published by the Free Software Foundation,
|
|
|
|
// either version 3 of the License, or (at your option) any later version.
|
2005-02-01 00:54:06 +00:00
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// BOINC is distributed in the hope that it will be useful,
|
2005-02-01 00:54:06 +00:00
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
// See the GNU Lesser General Public License for more details.
|
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// You should have received a copy of the GNU Lesser General Public License
|
|
|
|
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
2005-02-01 00:54:06 +00:00
|
|
|
|
|
|
|
#if defined(__GNUG__) && !defined(__APPLE__)
|
|
|
|
#pragma implementation "LogBOINC.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "stdwx.h"
|
|
|
|
#include "BOINCGUIApp.h"
|
|
|
|
#include "diagnostics.h"
|
|
|
|
#include "LogBOINC.h"
|
|
|
|
|
|
|
|
|
2014-06-11 18:15:39 +00:00
|
|
|
wxLogBOINC::wxLogBOINC() : wxLogStderr(stdout)
|
|
|
|
{
|
2005-02-01 00:54:06 +00:00
|
|
|
}
|
|
|
|
|
2012-10-19 19:36:46 +00:00
|
|
|
void wxLogBOINC::DoLogText(const wxString& msg) {
|
2005-02-01 00:54:06 +00:00
|
|
|
diagnostics_cycle_logs();
|
2005-04-27 01:34:35 +00:00
|
|
|
#ifdef __WXMSW__
|
2012-10-19 19:36:46 +00:00
|
|
|
wxString strDebug = msg;
|
2005-04-27 01:34:35 +00:00
|
|
|
strDebug += wxT("\r\n");
|
2014-03-25 22:23:58 +00:00
|
|
|
diagnostics_trace_to_debugger(strDebug.mb_str());
|
2005-04-27 01:34:35 +00:00
|
|
|
#endif
|
2014-05-23 19:22:16 +00:00
|
|
|
#ifdef __WXDEBUG__
|
2012-10-19 19:36:46 +00:00
|
|
|
wxLogStderr::DoLogText(msg);
|
2014-05-23 19:22:16 +00:00
|
|
|
#endif
|
2005-02-01 00:54:06 +00:00
|
|
|
}
|
|
|
|
|