]> granicus.if.org Git - icinga2/blob - lib/base/filelogger.hpp
Merge pull request #7185 from Icinga/bugfix/gelfwriter-wrong-log-facility
[icinga2] / lib / base / filelogger.hpp
1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
2
3 #ifndef FILELOGGER_H
4 #define FILELOGGER_H
5
6 #include "base/i2-base.hpp"
7 #include "base/filelogger-ti.hpp"
8
9 namespace icinga
10 {
11
12 /**
13  * A logger that logs to a file.
14  *
15  * @ingroup base
16  */
17 class FileLogger final : public ObjectImpl<FileLogger>
18 {
19 public:
20         DECLARE_OBJECT(FileLogger);
21         DECLARE_OBJECTNAME(FileLogger);
22
23         static void StatsFunc(const Dictionary::Ptr& status, const Array::Ptr& perfdata);
24
25         void Start(bool runtimeCreated) override;
26
27 private:
28         void ReopenLogFile();
29 };
30
31 }
32
33 #endif /* FILELOGGER_H */