MyGUI  3.4.0
MyGUI_FileLogListener.h
Go to the documentation of this file.
1 /*
2  * This source file is part of MyGUI. For the latest info, see http://mygui.info/
3  * Distributed under the MIT License
4  * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
5  */
6 
7 #ifndef MYGUI_FILE_LOG_LISTENER_H_
8 #define MYGUI_FILE_LOG_LISTENER_H_
9 
10 #include "MyGUI_Prerequest.h"
11 #include "MyGUI_ILogListener.h"
12 #include <fstream>
13 #include <string>
14 
15 namespace MyGUI
16 {
17 
19  public ILogListener
20  {
21  public:
23  virtual void open();
25  virtual void close();
27  virtual void flush();
29  virtual void log(const std::string& _section, LogLevel _level, const struct tm* _time, const std::string& _message, const char* _file, int _line);
30 
32  void setFileName(const std::string& _value);
34  const std::string& getFileName() const;
35 
36  private:
37  std::ofstream mStream;
38  std::string mFileName;
39  };
40 
41 } // namespace MyGUI
42 
43 #endif // MYGUI_FILE_LOG_LISTENER_H_
MyGUI_ILogListener.h
MyGUI_Prerequest.h
MyGUI::FileLogListener
Definition: MyGUI_FileLogListener.h:20
MyGUI::ILogListener
Definition: MyGUI_ILogListener.h:17
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition: MyGUI_Platform.h:89
MyGUI::LogLevel
Definition: MyGUI_LogLevel.h:19
MyGUI
Definition: MyGUI_ActionController.h:15