A library for logging options
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
log/lib/log.hpp

36 lines
542 B

1 year ago
#ifndef _LOG_
#define _LOG_
#include <iostream>
#include <iomanip>
#include <string>
#include <fstream>
#include <time.h>
#include <sys/stat.h>
using namespace std;
class log {
public:
string dir;
bool isKeepOpen;
ofstream logfile;
struct tm * moment;
uint day;
string path;
log (string _dir, bool _isKeepOpen = true);
bool isdir();
bool open();
void loose();
void setMoment();
void setPath();
void put(string logline);
void setPrefix(string &logline);
~log();
};
#endif