ClickHouse Change Log Level

 

The Clickhouse server logs are often useful in diagnosing issues and understanding how clients are interacting with Clickhouse. They are however fairly low level and detailed out of the box. At this stage therefore, it is worth reducing the logging level to only show warnings and errors as opposed to trace level logging.

To change this, stop the Clickhouse server, then open the Clickhouse configuration file:

vi /etc/clickhouse-server/config.xml
<clickhouse>
    <logger>
        <!-- Possible levels [1]:      
      - none (turns off logging)
      - fatal
      - critical
      - error
      - warning
      - notice
      - information
      - debug
      - trace
      - test (not for production usage)
    -->

    <level>trace</level>
    <log>/var/log/clickhouse-server/clickhouse-server.log</log>
    <errorlog>/var/log/clickhouse-server/clickhouse-server.err.log</errorlog>

    <size>1000M</size>
    <count>10</count>

And change the Clickhouse logger level from trace to warning:

<clickhouse>
    <logger>
        <level>warning</level>

When you restart the Clickhouse server, you will see fewer logs which are easier to monitor.

To examining logs please visit “Examining Errors Generated By ClickHouse” article.

 

 

Was this article helpful?

Related Articles

CHISTADATA IS COMMITTED TO OPEN SOURCE SOFTWARE AND BUILDING HIGH PERFORMANCE COLUMNSTORES

In the spirit of freedom, independence and innovation. ChistaDATA Corporation is not affiliated with ClickHouse Corporation 

Need Support?

Can't find the answer you're looking for?
Contact Support

ChistaDATA Inc. Knowledge base is licensed under the Apache License, Version 2.0 (the “License”)

Copyright 2022 ChistaDATA Inc

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.