42 lines
748 B
C++
42 lines
748 B
C++
#ifdef SERVER
|
|
|
|
#pragma once
|
|
|
|
#include "Hooks/StandardOut.hpp"
|
|
|
|
#include "Globals.hpp"
|
|
#include "Helpers.hpp"
|
|
|
|
enum class RequestType {
|
|
POST,
|
|
GET
|
|
};
|
|
|
|
enum class LogSeverity {
|
|
Information = RBX__MESSAGE_INFO,
|
|
Output = RBX__MESSAGE_OUTPUT,
|
|
Warning = RBX__MESSAGE_WARNING,
|
|
Error = RBX__MESSAGE_ERROR
|
|
};
|
|
|
|
class Server {
|
|
public:
|
|
static HANDLE Handle;
|
|
|
|
static void Initialize(const std::wstring jobId);
|
|
static void Cleanup();
|
|
|
|
struct Log
|
|
{
|
|
static void Http(const RequestType type, const std::string message);
|
|
static void Output(const LogSeverity severity, const std::string message);
|
|
};
|
|
private:
|
|
static std::string HttpLogPath;
|
|
static std::string OutputLogPath;
|
|
|
|
static std::ofstream HttpLog;
|
|
static std::ofstream OutputLog;
|
|
};
|
|
|
|
#endif |