ramazan polat
ramazan polat

Reputation: 7880

How to disable info logging for ClickHouse JDBC

Whenever I connect to ClickHouse with JDBC, I get this on my output:

ru.yandex.clickhouse.ClickHouseDriver connect
INFO: Creating connection

How to disable it?

Upvotes: 0

Views: 1840

Answers (2)

egorlitvinenko
egorlitvinenko

Reputation: 2776

I met problems in performance of Clickchouse JDBC because of Apache Http Client logger, when testing, this helps me:

log4j.configuration=log4j.properties 
log4j.rootLogger=ERROR, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p [%c] %m%n
log4j.logger.org.apache.http=ERROR

Upvotes: 1

Sergey Serebryanik
Sergey Serebryanik

Reputation: 33

You can disable or set another logging level for ru.yandex.clickhouse package. Logging in clickhouse-jdbc is done through slf4j.

For example if you use log4j, you can do like this:

<log4j:configuration>
    <!--other log4j configs-->
    <logger name="ru.yandex.clickhouse">
        <level value="WARN"/>
    </logger>
    <!--other log4j configs-->
</log4j:configuration>

Precise configuration depends on your exact logging config, but it must be similar.

Upvotes: 2

Related Questions