Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix send_logs_level for clickhouse local #35716

Merged
merged 4 commits into from
Apr 6, 2022

Conversation

kssenii
Copy link
Member

@kssenii kssenii commented Mar 29, 2022

Changelog category (leave one):

  • Improvement

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fix send_logs_level for clickhouse local. Closes #35653.

@CurtizJ CurtizJ self-assigned this Mar 29, 2022
@CurtizJ
Copy link
Member

CurtizJ commented Mar 30, 2022

Maybe support send_logs_level with SET query if it's possible?

@kssenii
Copy link
Member Author

kssenii commented Mar 30, 2022

It is possible but it will require to substitute logger initialisation with NullChannel () by default and set log level to none, then setting log level via query will work. But I am not sure that it will be better, what do you think?

I am talking about these lines:

else
{
Poco::Logger::root().setLevel("none");
Poco::Logger::root().setChannel(Poco::AutoPtr<Poco::NullChannel>(new Poco::NullChannel()));
}

@CurtizJ
Copy link
Member

CurtizJ commented Mar 30, 2022

Maybe reinitialise loggers when we receive SET send_logs_level query and throw an exception if server_logs_file is set?

@kssenii kssenii force-pushed the fix-local-logs-level branch from 7b7066f to 83488b2 Compare April 5, 2022 12:48
@robot-ch-test-poll robot-ch-test-poll added the pr-improvement Pull request with some product improvements label Apr 5, 2022
@kssenii kssenii force-pushed the fix-local-logs-level branch from f6dff19 to d3763c4 Compare April 6, 2022 10:13
@kssenii kssenii requested a review from CurtizJ April 6, 2022 15:47
@CurtizJ
Copy link
Member

CurtizJ commented Apr 6, 2022

Stress test Backward compatibility check: Fatal message in clickhouse-server.log is not related to changes.

@CurtizJ CurtizJ merged commit 13cb564 into ClickHouse:master Apr 6, 2022
yokofly added a commit to timeplus-io/proton that referenced this pull request Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-improvement Pull request with some product improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

send_logs_level don't work in clickhouse-local
3 participants