I am using JPA 2.1 and it keeps generating useless logs as below every time there is an operation on db. It gets printed out on console in red when debugging, but will output to stderr when I run the program in command line.
Jun 09, 2016 2:18:11 PM org.hibernate.jpa.internal.util.LogHelper logPersistenceUnitInformation
INFO: HHH000204: Processing PersistenceUnitInfo [
name: RIStore_Flow
...]
Jun 09, 2016 2:18:11 PM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {5.1.0.Final}
Jun 09, 2016 2:18:11 PM org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
Jun 09, 2016 2:18:11 PM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
Jun 09, 2016 2:18:11 PM org.hibernate.annotations.common.reflection.java.JavaReflectionManager <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
Jun 09, 2016 2:18:13 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
WARN: HHH10001002: Using Hibernate built-in connection pool (not for production use!)
Jun 09, 2016 2:18:13 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001005: using driver [oracle.jdbc.OracleDriver] at URL
Jun 09, 2016 2:18:13 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001001: Connection properties: {user=ristore_owner, password=****}
Jun 09, 2016 2:18:13 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001003: Autocommit mode: false
Jun 09, 2016 2:18:13 PM org.hibernate.engine.jdbc.connections.internal.PooledConnections <init>
INFO: HHH000115: Hibernate connection pool size: 20 (min=1)
Jun 09, 2016 2:18:14 PM org.hibernate.dialect.Dialect <init>
INFO: HHH000400: Using dialect: org.hibernate.dialect.Oracle10gDialect
Jun 09, 2016 2:18:14 PM org.hibernate.hql.internal.QueryTranslatorFactoryInitiator initiateService
INFO: HHH000397: Using ASTQueryTranslatorFactory
Jun 09, 2016 2:18:15 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl stop
INFO: HHH10001008: Cleaning up connection pool [jdbc:oracle:thin:@ldap://mdaoid.mdanderson.org:389/risdev3, cn=OracleContext,dc=mdacc,dc=tmc,dc=edu]
Jun 09, 2016 2:18:15 PM org.hibernate.jpa.internal.util.LogHelper logPersistenceUnitInformation
INFO: HHH000204: Processing PersistenceUnitInfo [
Since I am not using log4j to the logging, I don't think solution to this problem would help. By looking at the first line of the output, seems it is using org.hibernate.jpa.internal.util.LogHelper for logs. Is there something I can set in persistence.xml to turn off this kind of logs?
EDIT:
I just noticed this login.properties
file under my project, don't know when and how it is generated. But in that file there is some configuration about logging under eclipselink.logging. Should I change eclipselink.logging.level from FINE to SEVERE?
#Tue May 24 10:25:11 CDT 2016
javax.persistence.jdbc.url=
eclipselink.logging.session=false
eclipselink.logging.level=FINE
eclipselink.ddl-generation=drop-and-create-tables
eclipselink.logging.timestamp=false
eclipselink.logging.thread=false
eclipselink.ddl-generation.output-mode=database
eclipselink.logging.exceptions=true