Skip to content
Snippets Groups Projects
Select Git revision
  • c0a93f5f76c2630a1a4eaf9b589fd1d3d45b5b3f
  • master default protected
  • fix_Makefile.mingw#2
  • update_Makefile.mingw
  • fix_Makefile.mingw
  • fix_API_for_C_apps
  • fix_procinfo_mac
  • boinccmd_gpu_mode_always_until_sigterm
  • fgrp_osx_hotfix
  • fix_boinc_master@f8250782
  • eah_wrapper_improvements
  • diagnostics_win-hotfix
  • diagnostics_win-hotfix-old
  • current_fgrp_apps
  • testing_gw_apps
  • gw_app_darwin_15
  • current_brp_apps
  • current_brp_apps_android10
  • current_gfx_apps
  • current_server
  • current_gw_apps
  • previous_fgrp_apps
  • previous_gw_apps
  • testing_brp_apps
  • apps_FGRP3_1.07
  • apps_FGRP3_1.08
26 results

boinc_api_fortran.cpp

Blame
  • ConsoleLogging.cpp 2.07 KiB
    /*************************************************************************
     *   Copyright (C) 2007 by Oliver Bock                                   *
     *   bock@tfh-berlin.de                                                  *
     *                                                                       *
     *   This file is part of Fidelity.                                      *
     *                                                                       *
     *   Fidelity is free software: you can redistribute it and/or modify    *
     *   it under the terms of the GNU General Public License as published   *
     *   by the Free Software Foundation, version 3 of the License.          *
     *                                                                       *
     *   Fidelity is distributed in the hope that it will be useful,         *
     *   but WITHOUT ANY WARRANTY; without even the implied warranty of      *
     *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the        *
     *   GNU General Public License for more details.                        *
     *                                                                       *
     *   You should have received a copy of the GNU General Public License   *
     *   along with Fidelity. If not, see <http://www.gnu.org/licenses/>.    *
     *                                                                       *
     *************************************************************************/
    
    #include "ConsoleLogging.h"
    
    Fidelity::Common::ConsoleLogging::ConsoleLogging() : ALoggingFacility()
    {
    	initAttributes();
    }
    
    Fidelity::Common::ConsoleLogging::~ConsoleLogging()
    {}
    
    void Fidelity::Common::ConsoleLogging::initAttributes()
    {
    	qInstallMsgHandler(messageHandler);
    }
    
    void Fidelity::Common::ConsoleLogging::messageHandler(QtMsgType type, const char * msg)
    {
    	switch (type) {
    		case QtDebugMsg:
    			fprintf(stderr, "Debug: %s\n", msg);
    			break;
    
    		case QtWarningMsg:
    			fprintf(stderr, "Warning: %s\n", msg);
    			break;
    
    		case QtCriticalMsg:
    			fprintf(stderr, "Critical: %s\n", msg);
    			break;
    
    		case QtFatalMsg:
    			fprintf(stderr, "Fatal: %s (aborting)\n", msg);
    			abort();
    	}
    }