Skip to content

Commit

Permalink
Replace log4j by logback
Browse files Browse the repository at this point in the history
  • Loading branch information
Ludovic Auxepaules authored and auxepaul committed Jun 6, 2013
1 parent 952b7b8 commit 36ec550
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 23 deletions.
23 changes: 0 additions & 23 deletions resource-server-webapp/src/main/resources/log4j.properties

This file was deleted.

70 changes: 70 additions & 0 deletions resource-server-webapp/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to Jasig under one or more contributor license
agreements. See the NOTICE file distributed with this work
for additional information regarding copyright ownership.
Jasig licenses this file to you 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.
-->

<!-- For assistance related to logback-translator or configuration -->
<!-- files in general, please contact the logback user mailing list -->
<!-- at http://www.qos.ch/mailman/listinfo/logback-user -->
<!-- -->
<!-- For professional support please see -->
<!-- http://www.qos.ch/shop/products/professionalSupport -->
<!-- -->
<configuration scan="true" scanPeriod="30 seconds">
<contextName>ResourceServingWebapp</contextName>

<!--
| Propagate log levels to java.util.logging
+-->
<contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator">
<resetJUL>true</resetJUL>
</contextListener>

<!--
| Expose the logback configuration via JMX
+-->
<jmxConfigurator />

<!--
| Setup a console logger
|
| http://logback.qos.ch/manual/appenders.html#ConsoleAppender
+-->
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">

<!--
| Log message pattern configuration
|
| http://logback.qos.ch/manual/layouts.html#conversionWord
+-->
<encoder>
<pattern>%-5level [%thread] %logger{36} %d{ISO8601} - %msg%n</pattern>
</encoder>

</appender>

<!--
| Setup default log level to WARNING
+-->
<root level="WARN">
<appender-ref ref="CONSOLE" />
</root>

</configuration>

1 comment on commit 36ec550

@auxepaul
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix some unwanted DEBUG console logs:
22:50:30.935 [main] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Finished creating instance of bean 'org.springframework.web.servlet.handler.SimpleUrlHandlerMapping#0'
22:50:30.935 [main] DEBUG o.s.w.c.s.XmlWebApplicationContext - Unable to locate LifecycleProcessor with name 'lifecycleProcessor': using default [org.springframework.context.support.DefaultLifecycleProcessor@49b83355]
22:50:30.937 [main] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'lifecycleProcessor'
22:50:30.937 [main] DEBUG o.s.web.servlet.DispatcherServlet - Unable to locate MultipartResolver with name 'multipartResolver': no multipart request handling provided
22:50:30.938 [main] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Creating instance of bean org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver'
22:50:30.939 [main] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Finished creating instance of bean 'org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver'
22:50:30.940 [main] DEBUG o.s.web.servlet.DispatcherServlet - Unable to locate LocaleResolver with name 'localeResolver': using default [org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver@5c323742]
22:50:30.941 [main] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Creating instance of bean 'org.springframework.web.servlet.theme.FixedThemeResolver'
22:50:30.941 [main] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Finished creating instance of bean 'org.springframework.web.servlet.theme.FixedThemeResolver'
22:50:30.942 [main] DEBUG o.s.web.servlet.DispatcherServlet - Unable to locate ThemeResolver with name 'themeResolver': using default [org.springframework.web.servlet.theme.FixedThemeResolver@64c9fd57]

Please sign in to comment.