WSF
WsfSystemLog.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2003-2015 The Boeing Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11
12#ifndef WSFSYSTEMLOG_HPP
13#define WSFSYSTEMLOG_HPP
14
15#include "wsf_export.h"
16
17#include <iosfwd>
18#include <mutex>
19#include <string>
20
21class UtInput;
22
26
28{
29public:
32
33 static void DisableDefaultLogFile();
34
35 bool LoggingActive();
36 bool ProcessInput(UtInput& aInput);
37 bool OpenLogFile(const std::string& aFileName);
38 void WriteLogEntry(const std::string& aLogEntry);
39 void WriteOutputLogEntry(const std::string& aOutputFileType, const std::string& aOutputFilePath);
40
41private:
42 void CloseLogFile();
43 WsfSystemLog& operator=(const WsfSystemLog&) = delete;
45
46 std::mutex mMutex;
47
48 std::ofstream* mDefaultLogFilePtr;
49 std::ofstream* mLogFilePtr;
50};
51
52#endif
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
bool ProcessInput(UtInput &aInput)
Definition WsfSystemLog.cpp:67
void WriteLogEntry(const std::string &aLogEntry)
Definition WsfSystemLog.cpp:130
static void DisableDefaultLogFile()
Does not create a log file by default. Must be called prior to WsfApplication creation.
Definition WsfSystemLog.cpp:166
void WriteOutputLogEntry(const std::string &aOutputFileType, const std::string &aOutputFilePath)
Definition WsfSystemLog.cpp:159
WsfSystemLog()
Definition WsfSystemLog.cpp:30
bool LoggingActive()
Definition WsfSystemLog.cpp:61
bool OpenLogFile(const std::string &aFileName)
Definition WsfSystemLog.cpp:98
Copyrights Multiple, All Rights Reserved