forked from samuel-rey/StripMaker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlogger.h
31 lines (29 loc) · 962 Bytes
/
logger.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// "logger.h" was developed by the vSMR contributors, Pierre Ferran, Even Rognlien, Lionel Bischof, Daniel Lange, Juha Holopainen, Keanu Czirjak. Used under a GPL v3 license.
#pragma once
#include "pch.h"
#include "settings.h"
#include <string>
#include <sstream>
#include <sstream>
#include <iomanip>
#include <fstream>
class Logger {
public:
static bool ENABLED;
static void info(std::string message) {
if (Logger::ENABLED && settings.dllPath().length() > 0) {
std::ofstream file;
file.open(settings.dllPath() + "\\logs\\stripmaker.log", std::ofstream::out | std::ofstream::app);
file << "INFO: " << message << std::endl;
file.close();
}
}
static void error(std::string message) {
if (Logger::ENABLED && settings.dllPath().length() > 0) {
std::ofstream file;
file.open(settings.dllPath() + "\\logs\\stripmaker.log", std::ofstream::out | std::ofstream::app);
file << "ERROR: " << message << std::endl;
file.close();
}
}
};