Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
During upgrading log4j2 in grails 2.5.4 application, I removed all log4j 1.2.17 dependencies and added following dependencies pertaining to v2.17.1:
- log4j-api
- log4j-core
- log4j-1.2-api
- log4j-slf4j-impl
Here's my log4j2.properties file present under conf directory:
rootLogger.level = INFO rootLogger.appenderRefs = stdout rootLogger.appenderRef.stdout.ref = STDOUT logger.hibernate.name = org.hibernate logger.hibernate.level = error logger.controllers.name = org.codehaus.groovy.grails.web.servlet logger.controllers.level = error logger.gsp.name = org.codehaus.groovy.grails.web.pages logger.gsp.level = error logger.layouts.name = org.codehaus.groovy.grails.web.sitemesh logger.layouts.level = error logger.urlFilterMapping.name = org.codehaus.groovy.grails.web.mapping.filter logger.urlFilterMapping.level = error logger.urlMapping.name = org.codehaus.groovy.grails.web.mapping logger.urlMapping.level = error logger.commons.name = org.codehaus.groovy.grails.commons logger.commons.level = error logger.plugins.name = org.codehaus.groovy.grails.plugins logger.plugins.level = error logger.integration.name = org.codehaus.groovy.grails.orm.hibernate logger.integration.level = error logger.springframework.name = org.springframework logger.springframework.level = error logger.pluginResourceMeta.name = org.grails.plugin.resource.ResourceMeta logger.pluginResourceMeta.level = off logger.samlMeta.name = org.springframework.security.saml.metadata logger.samlMeta.level = off logger.services.name = grails.app.services.org.grails.plugin.resource logger.services.level = error logger.taglib.name = grails.app.taglib.org.grails.plugin.resource logger.taglib.level = error logger.resourceMapper.name = grails.app.resourceMappers.org.grails.plugin.resource logger.resourceMapper.level = error logger.resourceMeta.name = grails.app.resource.ResourceMeta logger.resourceMeta.level = error logger.debugFilter.name = grails.plugin.springsecurity.web.filter.DebugFilter logger.debugFilter.level = info logger.saml.name = org.springframework.security.saml logger.saml.level = debug logger.mortbay.name = org.mortbay.log logger.mortbay.level = warn appender.console.type = Console appender.console.name = STDOUT appender.console.layout.type = PatternLayout appender.console.layout.pattern = %d{yyyy-MM-dd HH:mm:ss} %-5p %c{1} - %m%n
As mentioned above, I've set the Hibernate logging level to ERROR.
But when the application boots up, the internal database related meta logs are also appearing. Following are the logs for reference:
Jan 24, 2022 4:49:26 PM org.hibernate.annotations.common.reflection.java.JavaReflectionManager <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {4.0.4.Final}
Jan 24, 2022 4:49:26 PM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {4.3.5.Final}
Jan 24, 2022 4:49:26 PM org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
Jan 24, 2022 4:49:26 PM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
.
.
.
Jan 24, 2022 4:49:38 PM org.hibernate.cache.ehcache.AbstractEhcacheRegionFactory getCache
WARN: HHH020003: Could not find a specific ehcache configuration for cache named [Domain name]; using defaults
.
.
.
Jan 24, 2022 4:49:41 PM org.hibernate.tool.hbm2ddl.TableMetadata <init>
INFO: HHH000261: Table found: [Table Name]
...