mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2026-04-02 18:25:30 +02:00
Port from git
This commit is contained in:
31
Source/Utility/Log.h
Normal file
31
Source/Utility/Log.h
Normal file
@@ -0,0 +1,31 @@
|
||||
/* This file is subject to the terms and conditions defined in
|
||||
* file 'LICENSE.txt', which is part of this source code package.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <streambuf>
|
||||
#include <iostream>
|
||||
|
||||
class Logger
|
||||
{
|
||||
public:
|
||||
enum Zone
|
||||
{
|
||||
ZONE_DEBUG,
|
||||
ZONE_INFO,
|
||||
ZONE_WARNING,
|
||||
ZONE_ERROR
|
||||
|
||||
};
|
||||
static bool StartLogFile(std::string file);
|
||||
static void Write(Zone zone, std::string component, std::string message);
|
||||
static void CloseLogFile();
|
||||
private:
|
||||
|
||||
static std::streambuf *CerrStream;
|
||||
static std::streambuf *CoutStream;
|
||||
static std::ofstream WriteFileStream;
|
||||
};
|
||||
Reference in New Issue
Block a user