created logging class

This commit is contained in:
lukas-heiligenbrunner
2019-10-26 14:41:43 +02:00
parent cc8c2b0497
commit 73b6754806
7 changed files with 153 additions and 64 deletions

27
inc/FileLogger.h Normal file
View File

@ -0,0 +1,27 @@
//
// Created by lukas on 05.05.19.
//
#pragma once
#include <string>
class FileLogger {
public:
/**
* log messages to logfile
* @param text message
*/
void logToLogfile(std::string text);
/**
* safe ip to temp file
* @param ip ip address to save
*/
void safeip(std::string ip);
/**
* read ip from file
* @return read ip
*/
std::string readip();
};

View File

@ -1,27 +1,22 @@
//
// Created by lukas on 05.05.19.
// Created by lukas on 26.10.19.
//
#pragma once
#include <string>
class Logger {
public:
/**
* log messages to logfile
* @param text message
*/
void logToLogfile(std::string text);
static void debug(std::string message);
static void message(std::string message);
static void warning(std::string message);
static void error(std::string message);
/**
* safe ip to temp file
* @param ip ip address to save
*/
void safeip(std::string ip);
/**
* read ip from file
* @return read ip
*/
std::string readip();
static void log(std::string message, int level);
static const int Debug;
static const int Message;
static const int Warning;
static const int Error;
};