Grail (C++)  1.1.1
A multi-platform, modular, universal engine for embedding advanced AI in games.
FileSink.hh
1 #ifndef GRAIL_FILE_SINK_H
2 #define GRAIL_FILE_SINK_H
3 
4 #include "Sink.hh"
5 
6 #include <fstream>
7 
8 namespace grail
9 {
13  class FileSink : public Sink
14  {
15  public:
21  FileSink(const std::string& filename, bool isSynchronized = false);
22 
23  protected:
24  virtual void Log(const std::string& message) override;
25 
26  private:
27  std::ofstream fileStream;
28  };
29 }
30 
31 #endif //GRAIL_FILE_SINK_H
grail::FileSink::Log
virtual void Log(const std::string &message) override
Log - override this method to define how the messege should be logged.
Definition: FileSink.cpp:12
grail::FileSink
The FileSink class - sink writing messages to file.
Definition: FileSink.hh:13
grail::Sink
The Sink class - destination of logger messages.
Definition: Sink.hh:12
grail::FileSink::FileSink
FileSink(const std::string &filename, bool isSynchronized=false)
FileSink.
Definition: FileSink.cpp:7