/***************************************************************************
*   Copyright (C) 2004 by Denis A. Birukov aka Messenger of death         *
*   riper@fromru.com                                                      *
*                                                                         *
*   This program 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; either version 2 of the License, or     *
*   (at your option) any later version.                                   *
*                                                                         *
*   This program 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 this program; if not, write to the                         *
*   Free Software Foundation, Inc.,                                       *
*   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
***************************************************************************/
#include "me_debug.h"
#include <me_c_log_interface.h>
#include <fstream>
namespace ME_n_Log
{
	ME_c_Log_Interface *debug=NULL;

	void _init_debug(ME_c_Log_Interface *lg)
	{
		if(debug!=NULL)delete debug;
		debug=lg;
	}
	void _set_debug_priority( Uint8 pr)
	{
		if(debug==NULL)return;
		debug->_set_priority(pr);
	}
	void _debug(std:: string text, Uint8 priority )
	{
		if(debug==NULL)return;
		debug->_log(text,priority);
	}
	ME_c_Log_Interface& _debug(Uint8 pr)
	{
		debug->operator()(pr);
		return *debug;
	}
	ME_c_Log_Interface& _debug()
	{
		return *debug;
	}
}
