1

Hi to everyone I have to disable log information from com.zaxxer.hikari.pool.HikariPool. I've tried with

Logger.getLogger("com.zaxxer.hikari.pool.HikariPool").setLevel(Level.OFF)

and with <Logger name ="com.zaxxer.hikari.pool.HikariPool" level="OFF"/> in my log4j2.xml file

But I still see Debug message like this

14:19:47.557 [HikariPool-1 connection adder] DEBUG com.zaxxer.hikari.pool.HikariPool - HikariPool-1

Can anyone help me?

Lino
  • 19,604
  • 6
  • 47
  • 65
  • Just for your information. Don't put *[SOLVED]* in the title, that's what the Accepted Answer is for. If your own answer helps you the most, you can accept it by clicking the checkmark (you may have to wait some time to accept an answer) – Lino Jul 26 '21 at 11:38
  • Oh, sorry! I'm new on this community and I don't know how it works. – Tony Agosta Jul 26 '21 at 11:41

2 Answers2

1

I solved my problem creating "logback.xml" file with this code:

<configuration>

    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
        <!-- encoders are assigned the type
            ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
        <encoder>
            <pattern>%d{HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n</pattern>
        </encoder>
    </appender>

    <root level="info">
        <appender-ref ref="STDOUT" />
    </root>
</configuration>
0

Try <Logger name ="com.zaxxer.hikari" level="OFF"/>

Referring to disable-hikaripool-logging

MJ.L
  • 23
  • 3