-
Notifications
You must be signed in to change notification settings - Fork 0
/
Logfile.hpp
48 lines (41 loc) · 1.17 KB
/
Logfile.hpp
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
38
39
40
41
42
43
44
45
46
47
48
#ifndef LOGFILE_HPP
#define LOGFILE_HPP
// Includes
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string>
// Defines
#define MAX_BUFFER 4096 // Maximale Gr��e f�r den Buffer
#define L_FAIL false // Funktion war erfolgreich
#define L_OK true // Funktion ist fehlgeschlagen
// Farben f�r den Text
enum FONTCOLORS
{
BLACK,
RED,
GREEN,
BLUE,
PURPLE,
ORANGE
};
class Clogfile
{
// Memberfunktionen
public:
Clogfile ();
~Clogfile ();
void CreateLogfile (void);
void WriteTopic (const char *Topic, int Size);
void Textout (std::string Text);
void Textout (int Color, std::string Text);
void Textout (int Color, bool List,std::string Text);
void TextoutF (const char *Text, ...);
void TextoutF (int Color, const char *Text, ...);
void TextoutF (int Color, bool List, const char *Text, ...);
void FunctionResult (const char *Name, const char *ErrorMessage, bool Result);
// Membervariablen
private:
FILE *m_logfile;
};
#endif