WoW Model Viewer
Your premiere tool for viewing, equipping and animating World of Warcraft models.
Loading...
Searching...
No Matches
LogOutputFile.cpp
Go to the documentation of this file.
1#include "LogOutputFile.h"
2
3using namespace WMVLog;
4
5LogOutputFile::LogOutputFile(std::string fileName)
6{
7 m_logFile.open(fileName, std::ios::out | std::ios::trunc);
8}
9
10void LogOutputFile::write(const std::string& message)
11{
12 std::lock_guard<std::mutex> locker(m_mutex);
13 m_logFile << message << "\n";
14 m_logFile.flush();
15}
std::ofstream m_logFile
void write(const std::string &message)
Write a log message to the file (thread-safe).