new option to verify syntax and parameters of config file
cdoc for logging class
This commit is contained in:
12
inc/Config.h
12
inc/Config.h
@ -16,7 +16,19 @@ public:
|
||||
static std::string telegramApiKey;
|
||||
static std::string chatId;
|
||||
|
||||
/**
|
||||
* read configuration out of config file
|
||||
*
|
||||
* @return success of config read
|
||||
*/
|
||||
static bool readCredentials();
|
||||
|
||||
/**
|
||||
* validate config file
|
||||
*
|
||||
* @return validity of config file
|
||||
*/
|
||||
static bool validateConfig();
|
||||
|
||||
private:
|
||||
};
|
25
inc/Logger.h
25
inc/Logger.h
@ -8,13 +8,38 @@
|
||||
|
||||
class Logger {
|
||||
public:
|
||||
/**
|
||||
* a debug message
|
||||
* @param message message
|
||||
*/
|
||||
static void debug(std::string message);
|
||||
|
||||
/**
|
||||
* a default message
|
||||
* @param message message
|
||||
*/
|
||||
static void message(std::string message);
|
||||
|
||||
/**
|
||||
* a warning message
|
||||
* @param message message
|
||||
*/
|
||||
static void warning(std::string message);
|
||||
|
||||
/**
|
||||
* a error message
|
||||
* @param message message
|
||||
*/
|
||||
static void error(std::string message);
|
||||
|
||||
/**
|
||||
* a log message with manual level set
|
||||
* @param message message
|
||||
* @param level loglevel (1-4) or predefined labels
|
||||
*/
|
||||
static void log(const std::string &message, int level);
|
||||
|
||||
|
||||
static const int Debug = 4;
|
||||
static const int Message = 3;
|
||||
static const int Warning = 2;
|
||||
|
Reference in New Issue
Block a user