This is an automated email from the ASF dual-hosted git repository.

vorburger pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git


The following commit(s) were added to refs/heads/develop by this push:
     new 069dae0  Log only WARN & ERR but not INFO anymore (re. FINERACT-1168)
069dae0 is described below

commit 069dae0355889ac794eea14460d891a4c7a9c908
Author: Michael Vorburger <[email protected]>
AuthorDate: Sat Nov 7 01:40:36 2020 +0100

    Log only WARN & ERR but not INFO anymore (re. FINERACT-1168)
---
 .../src/main/resources/logback-spring.xml          | 42 ++++++++++++++++++++++
 integration-tests/build.gradle                     |  4 +++
 2 files changed, 46 insertions(+)

diff --git a/fineract-provider/src/main/resources/logback-spring.xml 
b/fineract-provider/src/main/resources/logback-spring.xml
new file mode 100644
index 0000000..99e6e8c
--- /dev/null
+++ b/fineract-provider/src/main/resources/logback-spring.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements. See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership. The ASF 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.
+
+-->
+<configuration>
+    <!-- see 
https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-custom-log-configuration
+         and 
https://github.com/spring-projects/spring-boot/tree/master/spring-boot-project/spring-boot/src/main/resources/org/springframework/boot/logging/logback
 -->
+    <include resource="org/springframework/boot/logging/logback/defaults.xml" 
/>
+
+    <appender name="CONSOLE" target="System.out" 
class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <pattern>${CONSOLE_LOG_PATTERN}</pattern>
+        </encoder>
+    </appender>
+
+    <!-- See https://github.com/apache/fineract/#logging-guidelines for why by 
default we log only to INFO, only (WARN and) ERROR
+         but it's still possible to override this using java 
-Dlogging.level.root=info -jar fineract-provider.jar, as per 
https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-custom-log-levels
 -->
+    <root level="warn">
+        <appender-ref ref="CONSOLE" />
+    </root>
+
+    <!-- But these two INFO are still handy ;-) just to see when it's up and 
running -->
+    <logger 
name="org.springframework.boot.web.embedded.tomcat.TomcatWebServer" 
level="info" />
+    <logger name="org.apache.fineract.ServerApplication" level="info" />
+</configuration>
diff --git a/integration-tests/build.gradle b/integration-tests/build.gradle
index da6adba..73c974b 100644
--- a/integration-tests/build.gradle
+++ b/integration-tests/build.gradle
@@ -63,4 +63,8 @@ cargoStartLocal.mustRunAfter 'testClasses'
 test {
     dependsOn cargoStartLocal
     finalizedBy cargoStopLocal
+
+    beforeTest { descriptor ->
+        logger.lifecycle("Now running 
$descriptor.className#$descriptor.displayName...")
+    }
 }

Reply via email to