/***************************************************************************
*   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.             *
***************************************************************************/
#ifndef ME_N_LOGME_C_TEXT_LOG_H
#define ME_N_LOGME_C_TEXT_LOG_H

#include <me_c_log_interface.h>
#include <me_defines.h>
#include <iostream>
#include <string>
#include <fstream>

namespace ME_n_Log
{

	/**
	Данный класс реализует лог с выводом в указанный поток. Возможна инициализация с выводом в файл с использованием потоков.
	 
	@author Denis A. Birukov aka Messenger of death 
	*/
	class ME_c_Text_Log : public ME_c_Log_Interface
	{
			std::ostream* _log_stream_;
		public:
			/** Инициализирует лог с выводом в файл*/
			DECLSPEC ME_c_Text_Log(std::ostream &z);
			/** Инициализирует лог с выводом в поток*/
			DECLSPEC ME_c_Text_Log(std::string fname);
			/** Производит вывод указанной строки в поток*/
			DECLSPEC void _log( std::string arg1, Uint8 pr );
			DECLSPEC std::ostream& _log( Uint8 pr );
			DECLSPEC std::ostream& _log();
			/** Меняет приоритет*/
			DECLSPEC void _set_priority( Uint8 arg1 );
	};

}
#endif
