Logging-Klasse als Singleton. More...
#include <Logging.h>
Public Member Functions | |
virtual | ~Logging () |
Destruktor. | |
void | reset (void) |
Loescht den Inhalt der Logdatei und schreibt eine Startmeldung. | |
void | getPath (std::string &path) |
Ermittelt (Betriebssystemunabhaengig) den lokalen Pfad, inkl. abschliessenden Slash/Backslash. | |
void | info (char *msg) |
Info-Ausgabe. | |
void | debug (char *msg) |
Debug-Ausgabe. | |
void | error (char *msg) |
Error-Ausgabe. | |
Static Public Member Functions | |
static Logging * | getInstance () |
Liefert die Singleton-Instanz. | |
Public Attributes | |
char | m_msg [1024] |
Protected Member Functions | |
Logging () | |
Konstruktor. | |
Private Member Functions | |
void | write (std::string &msg) |
write | |
void | getDate (void) |
Ermittelt Datum und Uhrzeit. | |
Private Attributes | |
std::string | m_logpath |
std::string | m_logfile |
std::string | m_date |
Static Private Attributes | |
static Logging * | _instance = 0 |
Logging-Klasse als Singleton.
Logging::Logging | ( | ) | [protected] |
Konstruktor.
Logging::~Logging | ( | ) | [virtual] |
Destruktor.
void Logging::debug | ( | char * | msg | ) |
Debug-Ausgabe.
msg | Logtext |
void Logging::error | ( | char * | msg | ) |
Error-Ausgabe.
msg | Logtext |
void Logging::getDate | ( | void | ) | [private] |
Ermittelt Datum und Uhrzeit.
Logging * Logging::getInstance | ( | ) | [static] |
Liefert die Singleton-Instanz.
void Logging::getPath | ( | std::string & | path | ) |
Ermittelt (Betriebssystemunabhaengig) den lokalen Pfad, inkl. abschliessenden Slash/Backslash.
void Logging::info | ( | char * | msg | ) |
Info-Ausgabe.
msg | Logtext |
void Logging::reset | ( | void | ) |
Loescht den Inhalt der Logdatei und schreibt eine Startmeldung.
void Logging::write | ( | std::string & | msg | ) | [private] |
write
msg | Logtext |
Logging * Logging::_instance = 0 [static, private] |
std::string Logging::m_date [private] |
std::string Logging::m_logfile [private] |
std::string Logging::m_logpath [private] |
char Logging::m_msg[1024] |