ClickHouse/src/Interpreters/ErrorLog.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
872 B
C++
Raw Normal View History

#pragma once
#include <Interpreters/SystemLog.h>
2024-06-20 15:40:50 +00:00
#include <Interpreters/PeriodicLog.h>
#include <Common/ErrorCodes.h>
#include <Core/NamesAndTypes.h>
#include <Core/NamesAndAliases.h>
#include <Storages/ColumnsDescription.h>
namespace DB
{
/** ErrorLog is a log of error values measured at regular time interval.
*/
struct ErrorLogElement
{
time_t event_time{};
ErrorCodes::ErrorCode code{};
ErrorCodes::Value value{};
bool remote{};
static std::string name() { return "ErrorLog"; }
static ColumnsDescription getColumnsDescription();
static NamesAndAliases getNamesAndAliases() { return {}; }
void appendToBlock(MutableColumns & columns) const;
};
2024-06-20 15:40:50 +00:00
class ErrorLog : public PeriodicLog<ErrorLogElement>
{
2024-06-20 15:40:50 +00:00
using PeriodicLog<ErrorLogElement>::PeriodicLog;
2024-06-20 15:40:50 +00:00
protected:
void stepFunction(TimePoint current_time) override;
};
}