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"
|
|
|
|
|
|
|
|
|
2005-04-07 07:04:50 +00:00
|
|
|
wxLogBOINC::wxLogBOINC() {
|
2005-02-01 00:54:06 +00:00
|
|
|
m_fp = stdout;
|
|
|
|
}
|
|
|
|
|
2005-04-07 07:04:50 +00:00
|
|
|
void wxLogBOINC::DoLogString(const wxChar *szString, time_t t) {
|
2005-02-01 00:54:06 +00:00
|
|
|
diagnostics_cycle_logs();
|
2005-04-27 01:34:35 +00:00
|
|
|
#ifdef __WXMSW__
|
|
|
|
wxString strDebug = szString;
|
|
|
|
strDebug += wxT("\r\n");
|
|
|
|
::OutputDebugString(strDebug.c_str());
|
|
|
|
#endif
|
2005-02-01 00:54:06 +00:00
|
|
|
wxLogStderr::DoLogString(szString, t);
|
|
|
|
}
|
|
|
|
|