Commit f2052058 authored by Artem Hrybeniuk's avatar Artem Hrybeniuk
Browse files

Logging with slf4j

parent 8273708a
#-------------------------------------------------------------------------------
# Copyright 2017 Global Crop Diversity Trust
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#-------------------------------------------------------------------------------
### direct log messages to stdout ###
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.target=System.out
log4j.appender.stdout.encoding=UTF-8
log4j.appender.stdout.layout=org.apache.log4j.EnhancedPatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %t %5p %c:%L - %m%n
### set log levels - for more verbose logging change 'info' to 'debug' ###
log4j.rootLogger=error, stdout
#log4j.category.org.genesys.blocks=debug
#log4j.category.org.genesys.blocks.auditlog=trace
## Shut up hsql
log4j.category.org.hibernate.tool.hbm2ddl.SchemaExport=fatal
log4j.category.org.hibernate.engine.jdbc.spi.SqlExceptionHelper=fatal
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2021 Global Crop Diversity Trust
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<Configuration>
<Appenders>
<Console name="console">
<PatternLayout pattern="%d{ABSOLUTE} %t %5p %c:%L - %m%n"/>
</Console>
</Appenders>
<Loggers>
<Logger name="org.hibernate.tool.hbm2ddl.SchemaExport" level="fatal" />
<Logger name="org.hibernate.engine.jdbc.spi.SqlExceptionHelper" level="fatal" />
<Root level="error">
<AppenderRef ref="console" />
</Root>
</Loggers>
</Configuration>
\ No newline at end of file
......@@ -32,7 +32,7 @@
<jdk.target>11</jdk.target>
<jdk.source>11</jdk.source>
<show.deprecations>false</show.deprecations>
<slf4j.version>1.7.31</slf4j.version>
<log4j2.version>2.16.0</log4j2.version>
<junit.version>4.13.2</junit.version>
<org.hamcrest.version>2.2</org.hamcrest.version>
......@@ -164,16 +164,16 @@
<!-- Logging dependencies -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>${log4j2.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${slf4j.version}</version>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-jcl</artifactId>
<version>${log4j2.version}</version>
<scope>provided</scope>
</dependency>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment