Update log.hpp
This commit is contained in:
parent
4368d6d7ee
commit
6f8ec89373
10
log.hpp
10
log.hpp
@ -5,14 +5,24 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
/** Log Class */
|
||||||
class Log
|
class Log
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/** Construct */
|
||||||
Log();
|
Log();
|
||||||
|
/** Deconstruct */
|
||||||
~Log();
|
~Log();
|
||||||
|
/// Init the log file
|
||||||
|
/// filename: name for the file
|
||||||
void Init(const char *filename);
|
void Init(const char *filename);
|
||||||
|
/// Write Text to logfile
|
||||||
|
/// debug_text: your text
|
||||||
void Write(std::string debug_text);
|
void Write(std::string debug_text);
|
||||||
|
/// Get the date
|
||||||
std::string logDate(void);
|
std::string logDate(void);
|
||||||
|
/// Format to logstyle
|
||||||
|
/// fmt_str: the formatted style
|
||||||
std::string format(const std::string& fmt_str, ...);
|
std::string format(const std::string& fmt_str, ...);
|
||||||
private:
|
private:
|
||||||
std::string filename;
|
std::string filename;
|
||||||
|
Loading…
Reference in New Issue
Block a user