f@5: /*
f@5:
f@5: Copyright (C) 2016 Queen Mary University of London
f@5: Author: Fiore Martin
f@5:
f@5: This file is part of Collidoscope.
f@5:
f@5: Collidoscope is free software: you can redistribute it and/or modify
f@5: it under the terms of the GNU General Public License as published by
f@5: the Free Software Foundation, either version 3 of the License, or
f@5: (at your option) any later version.
f@5:
f@5: This program is distributed in the hope that it will be useful,
f@5: but WITHOUT ANY WARRANTY; without even the implied warranty of
f@5: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
f@5: GNU General Public License for more details.
f@5:
f@5: You should have received a copy of the GNU General Public License
f@5: along with this program. If not, see .
f@5: */
f@5:
f@0:
f@0: #include "cinder/Log.h"
f@0:
f@0: bool fileLoggerCreated = false;
f@0:
f@0: void logError( const std::string &errorMsg )
f@0: {
f@0: using namespace ci::log;
f@0:
f@0: if ( !fileLoggerCreated ){
f@0: makeLogger( "./collidoscope_error.log" );
f@0: fileLoggerCreated = true;
f@0: }
f@0:
f@0: LogManager *log = LogManager::instance();
f@0:
f@0: Metadata logMeta;
f@0: logMeta.mLevel = LEVEL_ERROR;
f@0:
f@0: log->write( logMeta, errorMsg );
f@0:
f@0: }
f@0:
f@0: void logInfo( const std::string &infoMsg )
f@0: {
f@0: #ifdef _DEBUG
f@0: using namespace ci::log;
f@0:
f@0: LogManager *log = LogManager::instance();
f@0:
f@0: Metadata logMeta;
f@0: logMeta.mLevel = LEVEL_INFO;
f@0:
f@0: log->write( logMeta, infoMsg );
f@0: #endif
f@0: }