How to disable logging in hibernate?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
42 views
All prove!

Help pliz turn off this garbage:(

Oct 13, 2018 11:55:39 AM org.hibernate.Version logVersion INFO: HHH000412: Hibernate Core {5.2.17.Final} Oct 13, 2018 11:55:39 AM org.hibernate.cfg.Environment INFO: HHH000205: Loaded properties from resource hibernate.properties: {hibernate.bytecode.use_reflection_optimizer=false} Oct 13, 2018 11:55:41 AM org.hibernate.annotations.common.reflection.java.JavaReflectionManager INFO: HCANN000001: Hibernate Commons Annotations {5.0.1.Final} Oct 13, 2018 11:55:41 AM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure WARN: HHH10001002: Using Hibernate built-in connection pool (not for production use!) Oct 13, 2018 11:55:41 AM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator INFO: HHH10001005: using driver [org.postgresql.Driver] at URL [jdbc:postgresql://localhost/app] Oct 13, 2018 11:55:41 AM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator INFO: HHH10001001: Connection properties: {user=postgres, password=****} Oct 13, 2018 11:55:41 AM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator INFO: HHH10001003: Autocommit mode: false Oct 13, 2018 11:55:41 AM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl$PooledConnections INFO: HHH000115: Hibernate connection pool size: 20 (min=1) Oct 13, 2018 11:55:41 AM org.hibernate.dialect.Dialect INFO: HHH000400: Using dialect: org.hibernate.dialect.PostgreSQL9Dialect Oct 13, 2018 11:55:41 AM org.hibernate.engine.jdbc.env.internal.LobCreatorBuilderImpl useContextualLobCreation INFO: HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException Oct 13, 2018 11:55:41 AM org.hibernate.type.BasicTypeRegistry register INFO: HHH000270: Type registration [java.util.UUID] overrides previous : org.hibernate.type.UUIDBinaryType@7bba5817 Oct 13, 2018 11:55:41 AM org.hibernate.resource.transaction.backend.jdbc.internal.DdlTransactionIsolatorNonJtaImpl getIsolatedConnection

Further in this spirit... prevents kapets. Googled and found the solution.
by | 42 views

2 Answers

0 like 0 dislike
log4j.logger.org.hibernate=info
IN XML
\r\r
by
0 like 0 dislike
in General, do the following:
created a file in src/main/resources/log4j.properties with the following contents
log4j.appender.file=org.apache.log4j.RollingFileAppender log4j.appender.file.File=/home/sanan/logs/log4j.log log4j.appender.file.MaxFileSize=1MB log4j.appender.file.MaxBackupIndex=1 log4j.appender.file.layout=org.apache.log4j.PatternLayout log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n # Root logger option log4j.rootLogger=FATAL, file # Log everything. Good for troubleshooting log4j.logger.org.hibernate=FATAL # Log all JDBC parameters log4j.logger.org.hibernate.type=ERROR

in the file pom.xml in dependencies I added:
\rorg.slf4j\rslf4j-log4j12\r1.6.1\r

it worked, but of course, only when running via maven
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
asked Jun 2, 2019 by Romka21
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
35,391 users