dxvk/src/util/log/log.h

40 lines
643 B
C
Raw Normal View History

2017-10-10 22:32:13 +01:00
#pragma once
#include <fstream>
#include <iostream>
#include <mutex>
#include <string>
#include "../rc/util_rc.h"
namespace dxvk {
/**
* \brief Logger
*
* Logs messages generated by DXVK and
* the client APIs using DXVK.
*/
class Log : public RcObject {
public:
Log(const std::string& filename);
~Log();
/**
* \brief Adds a message to the log
*
* Prints the message to stderr and appends
* it to the log file at the same time.
*/
void log(const std::string& message);
private:
std::mutex m_mutex;
std::fstream m_stream;
};
}