icinga2/lib/base/filelogger.hpp

34 lines
556 B
C++
Raw Normal View History

/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
2013-06-06 11:26:00 +02:00
#ifndef FILELOGGER_H
#define FILELOGGER_H
2013-06-06 11:26:00 +02:00
2014-05-25 16:23:35 +02:00
#include "base/i2-base.hpp"
2018-01-18 13:50:38 +01:00
#include "base/filelogger-ti.hpp"
2013-06-06 11:26:00 +02:00
namespace icinga
{
/**
* A logger that logs to a file.
2013-06-06 11:26:00 +02:00
*
* @ingroup base
*/
2018-01-04 06:11:04 +01:00
class FileLogger final : public ObjectImpl<FileLogger>
2013-06-06 11:26:00 +02:00
{
public:
2014-11-03 00:44:04 +01:00
DECLARE_OBJECT(FileLogger);
DECLARE_OBJECTNAME(FileLogger);
2013-06-06 11:26:00 +02:00
static void StatsFunc(const Dictionary::Ptr& status, const Array::Ptr& perfdata);
void Start(bool runtimeCreated) override;
2014-05-22 11:22:30 +02:00
private:
void ReopenLogFile();
2013-06-06 11:26:00 +02:00
};
}
#endif /* FILELOGGER_H */