Blame synfig-core/src/synfig/debug/log.h

371bd9
/* === S Y N F I G ========================================================= */
371bd9
/*!	\file debug/log.h
371bd9
**	\brief Template Header
371bd9
**
371bd9
**	$Id$
371bd9
**
371bd9
**	\legal
371bd9
**	......... ... 2015 Ivan Mahonin
371bd9
**
371bd9
**	This package is free software; you can redistribute it and/or
371bd9
**	modify it under the terms of the GNU General Public License as
371bd9
**	published by the Free Software Foundation; either version 2 of
371bd9
**	the License, or (at your option) any later version.
371bd9
**
371bd9
**	This package is distributed in the hope that it will be useful,
371bd9
**	but WITHOUT ANY WARRANTY; without even the implied warranty of
371bd9
**	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
371bd9
**	General Public License for more details.
371bd9
**	\endlegal
371bd9
*/
371bd9
/* ========================================================================= */
371bd9
371bd9
/* === S T A R T =========================================================== */
371bd9
371bd9
#ifndef __SYNFIG_DEBUG_LOG_H
371bd9
#define __SYNFIG_DEBUG_LOG_H
371bd9
371bd9
/* === H E A D E R S ======================================================= */
371bd9
371bd9
#include <etl handle=""></etl>
371bd9
#include <synfig string.h=""></synfig>
Rodolfo Ribeiro Gomes d18249
#include <mutex></mutex>
371bd9
371bd9
/* === M A C R O S ========================================================= */
371bd9
371bd9
/* === T Y P E D E F S ===================================================== */
371bd9
371bd9
/* === C L A S S E S & S T R U C T S ======================================= */
371bd9
371bd9
371bd9
namespace synfig {
371bd9
namespace debug {
371bd9
371bd9
class Log
371bd9
{
371bd9
private:
Rodolfo Ribeiro Gomes d18249
	static std::mutex mutex_;
371bd9
371bd9
public:
371bd9
371bd9
static void append_line_to_file(const String &logfile, const String &str);
371bd9
371bd9
371bd9
//! Reports an error
371bd9
/*! Call this when an error occurs, describing what happened */
371bd9
static void error(const String &logfile, const String &str);
371bd9
static void error(const String &logfile, const char *format,...);
371bd9
371bd9
//! Reports a warning
371bd9
/*! Call this when something questionable occurs, describing what happened */
371bd9
static void warning(const String &logfile, const String &str);
371bd9
static void warning(const String &logfile, const char *format,...);
371bd9
371bd9
//! Reports some information
371bd9
/*! Call this to report various information. Please be sparse... */
371bd9
static void info(const String &logfile, const String &str);
371bd9
static void info(const String &logfile, const char *format,...);
371bd9
371bd9
};
371bd9
371bd9
}; // END of namespace debug
371bd9
}; // END of namespace synfig
371bd9
371bd9
/* === E N D =============================================================== */
371bd9
371bd9
#endif