mirror of
https://github.com/uroni/urbackup_backend.git
synced 2025-10-26 11:36:50 +00:00
27 lines
638 B
C++
27 lines
638 B
C++
#include "../Interface/Server.h"
|
|
#include "../Interface/Mutex.h"
|
|
|
|
|
|
struct SLogEntry
|
|
{
|
|
std::wstring data;
|
|
int loglevel;
|
|
unsigned int time;
|
|
};
|
|
|
|
class ServerLogger
|
|
{
|
|
public:
|
|
static void Log(int clientid, const std::string &pStr, int LogLevel=LL_INFO);
|
|
static void Log(int clientid, const std::wstring &pStr, int LogLevel=LL_INFO);
|
|
|
|
static void init_mutex(void);
|
|
static void destroy_mutex(void);
|
|
|
|
static std::wstring getLogdata(int clientid, int &errors, int &warnings, int &infos);
|
|
static void reset(int clientid);
|
|
|
|
private:
|
|
static std::map<int, std::vector<SLogEntry> > logdata;
|
|
static IMutex *mutex;
|
|
}; |