mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-30 19:42:00 +00:00
Try to fix test, rename arg
This commit is contained in:
parent
aa888ad64a
commit
688b55b6ff
@ -41,9 +41,9 @@ ISystemLog::~ISystemLog() = default;
|
|||||||
|
|
||||||
template <typename LogElement>
|
template <typename LogElement>
|
||||||
SystemLogQueue<LogElement>::SystemLogQueue(
|
SystemLogQueue<LogElement>::SystemLogQueue(
|
||||||
const String & name_,
|
const String & table_name_,
|
||||||
size_t flush_interval_milliseconds_)
|
size_t flush_interval_milliseconds_)
|
||||||
: log(&Poco::Logger::get(name_))
|
: log(&Poco::Logger::get("SystemLogQueue (" + table_name_ + ")"))
|
||||||
, flush_interval_milliseconds(flush_interval_milliseconds_)
|
, flush_interval_milliseconds(flush_interval_milliseconds_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -120,6 +120,7 @@ void SystemLogQueue<LogElement>::push(const LogElement & element)
|
|||||||
template <typename LogElement>
|
template <typename LogElement>
|
||||||
uint64_t SystemLogQueue<LogElement>::notifyFlush(bool should_prepare_tables_anyway)
|
uint64_t SystemLogQueue<LogElement>::notifyFlush(bool should_prepare_tables_anyway)
|
||||||
{
|
{
|
||||||
|
|
||||||
uint64_t this_thread_requested_offset;
|
uint64_t this_thread_requested_offset;
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -204,10 +205,10 @@ void SystemLogQueue<LogElement>::shutdown()
|
|||||||
|
|
||||||
template <typename LogElement>
|
template <typename LogElement>
|
||||||
SystemLogBase<LogElement>::SystemLogBase(
|
SystemLogBase<LogElement>::SystemLogBase(
|
||||||
const String& name,
|
const String& table_name_,
|
||||||
size_t flush_interval_milliseconds_,
|
size_t flush_interval_milliseconds_,
|
||||||
std::shared_ptr<SystemLogQueue<LogElement>> queue_)
|
std::shared_ptr<SystemLogQueue<LogElement>> queue_)
|
||||||
: queue(queue_ ? queue_ : std::make_shared<SystemLogQueue<LogElement>>(name, flush_interval_milliseconds_))
|
: queue(queue_ ? queue_ : std::make_shared<SystemLogQueue<LogElement>>(table_name_, flush_interval_milliseconds_))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ class SystemLogQueue
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
SystemLogQueue(
|
SystemLogQueue(
|
||||||
const String & name_,
|
const String & table_name_,
|
||||||
size_t flush_interval_milliseconds_);
|
size_t flush_interval_milliseconds_);
|
||||||
|
|
||||||
void shutdown();
|
void shutdown();
|
||||||
@ -130,7 +130,7 @@ public:
|
|||||||
using Self = SystemLogBase;
|
using Self = SystemLogBase;
|
||||||
|
|
||||||
SystemLogBase(
|
SystemLogBase(
|
||||||
const String& name,
|
const String& table_name_,
|
||||||
size_t flush_interval_milliseconds_,
|
size_t flush_interval_milliseconds_,
|
||||||
std::shared_ptr<SystemLogQueue<LogElement>> queue_ = nullptr);
|
std::shared_ptr<SystemLogQueue<LogElement>> queue_ = nullptr);
|
||||||
|
|
||||||
|
@ -255,10 +255,10 @@ void Loggers::buildLoggers(Poco::Util::AbstractConfiguration & config, Poco::Log
|
|||||||
#ifndef WITHOUT_TEXT_LOG
|
#ifndef WITHOUT_TEXT_LOG
|
||||||
if (config.has("text_log"))
|
if (config.has("text_log"))
|
||||||
{
|
{
|
||||||
String text_log_level_str = config.getString("text_log.level", "");
|
String text_log_level_str = config.getString("text_log.level", "trace");
|
||||||
int text_log_level = text_log_level_str.empty() ? INT_MAX : Poco::Logger::parseLevel(text_log_level_str);
|
int text_log_level = Poco::Logger::parseLevel(text_log_level_str);
|
||||||
size_t flush_interval_milliseconds = config.getUInt64("text_log.flush_interval_milliseconds",
|
size_t flush_interval_milliseconds = config.getUInt64("text_log.flush_interval_milliseconds",
|
||||||
DEFAULT_SYSTEM_LOG_FLUSH_INTERVAL_MILLISECONDS);
|
DEFAULT_SYSTEM_LOG_FLUSH_INTERVAL_MILLISECONDS);
|
||||||
split->addTextLog(DB::TextLog::getLogQueue(flush_interval_milliseconds), text_log_level);
|
split->addTextLog(DB::TextLog::getLogQueue(flush_interval_milliseconds), text_log_level);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
2
tests/queries/0_stateless/02813_starting_in_text_log.sql
Executable file → Normal file
2
tests/queries/0_stateless/02813_starting_in_text_log.sql
Executable file → Normal file
@ -1,2 +1,2 @@
|
|||||||
SYSTEM FLUSH LOGS;
|
SYSTEM FLUSH LOGS;
|
||||||
SELECT count() > 0 FROM system.text_log WHERE event_date >= yesterday() AND message LIKE '%Application: Starting ClickHouse%';
|
SELECT count() > 0 FROM system.text_log WHERE event_date >= yesterday() AND message LIKE '%Starting ClickHouse%';
|
||||||
|
Loading…
Reference in New Issue
Block a user