|
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LogXML 1.0
------------------
LogXML is a simple and free logging class for all purposes.
You can use it freely und unlimited but give me credit
where it's due.
Source code is ready for DoxyGen (http://www.doxygen.org/).
Written by Christian Richardt (cr@whizer.net).
Release history:
Mai 12, 2003: Version 1.0. First release.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
/**
\file LogXML.h
\brief XML log class
\date 2003-05-12
\author Christian Richardt (cr@whizer.net)
**/
#ifndef LOGXML_H
#define LOGXML_H
#include <stdio.h>
/// base name of file
char* FileName(char* strFile);
/// UNIX timestamp: seconds from 1970-01-01 00:00:00 (UTC)
double mtime(void);
/**
\brief LogXML is a simple and free logging class for all purposes.
\author Christian Richardt (cr@whizer.net)
**/
class LogXML
{
public:
LogXML(char* filename, char* appName="None");
~LogXML();
bool goDown(char* message=0, char* filename=0, char* funcname=0);
void goUp(void);
bool Log(char* message, char* filename=0, char* funcname=0);
bool WriteLine(char* data);
bool WriteLine(char* tagname, char* contents);
bool WriteTimestamp(void);
bool WriteDateTime(void);
protected:
bool WriteData(char* data);
char* m_strFilename; ///< log file name
FILE* LogFile; ///< file handle of log file
int Depth; ///< current depth in document
};
#endif // LOGXML_H
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.