summaryrefslogtreecommitdiff
path: root/src/wgl/rtotex/log.h
blob: 76e52c886518cc066029ce32defc53239fca7578 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//////////////////////////////////////////////////////////////////////////////////////////
//	log.h
//	class to output an error log
//	Downloaded from: www.paulsprojects.net
//	Created:	20th July 2002
//
//	Copyright (c) 2006, Paul Baker
//	Distributed under the New BSD Licence. (See accompanying file License.txt or copy at
//	http://www.paulsprojects.net/NewBSDLicense.txt)
//////////////////////////////////////////////////////////////////////////////////////////	

#ifndef LOG_H
#define LOG_H

#include <stdio.h>
#include <stdarg.h>

class LOG
{
protected:
	FILE * logfile;
	
	bool Shutdown(void);

public:
	bool Init(const char * filename);

	//Output to log
	void OutputNewline();
	void OutputError(const char * text, ...);
	void OutputSuccess(const char * text, ...);
		
	LOG() {}
	~LOG(){ Shutdown(); }
};

#endif