You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by je...@apache.org on 2017/10/12 07:29:04 UTC
[incubator-openwhisk] branch master updated: Change logging backend
from log4j to Logback (#2818)
This is an automated email from the ASF dual-hosted git repository.
jeremiaswerner pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git
The following commit(s) were added to refs/heads/master by this push:
new 0295254 Change logging backend from log4j to Logback (#2818)
0295254 is described below
commit 029525471ec915bb5aaf5b030f61974ac617eaf2
Author: Martin Henke <ma...@web.de>
AuthorDate: Thu Oct 12 09:29:01 2017 +0200
Change logging backend from log4j to Logback (#2818)
---
common/scala/build.gradle | 14 +++++----
common/scala/src/main/resources/log4j.properties | 37 ------------------------
common/scala/src/main/resources/logback.xml | 18 ++++++++++++
common/scala/src/main/resources/logging.conf | 3 +-
4 files changed, 29 insertions(+), 43 deletions(-)
diff --git a/common/scala/build.gradle b/common/scala/build.gradle
index 066f835..7299bad 100644
--- a/common/scala/build.gradle
+++ b/common/scala/build.gradle
@@ -19,15 +19,19 @@ dependencies {
compile 'com.typesafe.akka:akka-http-core_2.11:10.0.10'
compile 'com.typesafe.akka:akka-http-spray-json_2.11:10.0.10'
- compile 'log4j:log4j:1.2.16'
+ compile 'ch.qos.logback:logback-classic:1.2.3'
+ compile 'org.slf4j:jcl-over-slf4j:1.7.25'
+ compile 'org.slf4j:log4j-over-slf4j:1.7.25'
compile 'commons-codec:commons-codec:1.9'
compile 'commons-io:commons-io:2.4'
- compile 'commons-logging:commons-logging:1.2'
compile 'commons-collections:commons-collections:3.2.2'
- compile 'org.apache.zookeeper:zookeeper:3.4.10'
compile 'org.apache.kafka:kafka-clients:0.10.2.1'
- compile 'org.apache.httpcomponents:httpclient:4.4.1'
- compile 'com.fasterxml.uuid:java-uuid-generator:3.1.3'
+ compile ('org.apache.httpcomponents:httpclient:4.4.1') {
+ exclude group: 'commons-logging'
+ }
+ compile ('com.fasterxml.uuid:java-uuid-generator:3.1.3') {
+ exclude group: 'log4j'
+ }
compile 'com.github.ben-manes.caffeine:caffeine:2.4.0'
compile 'com.google.code.findbugs:jsr305:3.0.2'
}
diff --git a/common/scala/src/main/resources/log4j.properties b/common/scala/src/main/resources/log4j.properties
deleted file mode 100644
index f997fff..0000000
--- a/common/scala/src/main/resources/log4j.properties
+++ /dev/null
@@ -1,37 +0,0 @@
-# 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.
-log4j.rootLogger=INFO, stdout
-
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.EnhancedPatternLayout
-# note the timezone in the timestamp format
-log4j.appender.stdout.layout.ConversionPattern=[%d{yyyy-MM-dd'T'HH:mm:ss.SSS'Z'}{GMT}] [%p] %m %n
-
-log4j.logger.kafka=ERROR
-log4j.logger.org.apache.kafka=ERROR
-
-# zkclient can be verbose, during debugging it is common to adjust it separately
-log4j.logger.org.I0Itec.zkclient.ZkClient=WARN
-log4j.logger.org.apache.zookeeper=WARN
-
-# LightCouch
-log4j.logger.org.lightcouch=INFO
-
-# Apache HttpClient
-log4j.logger.org.apache.http=ERROR
-
-
-# akka
-#log4j.logger.akka.actor.RepointableActorRef=INFO, stdout
diff --git a/common/scala/src/main/resources/logback.xml b/common/scala/src/main/resources/logback.xml
new file mode 100644
index 0000000..dc3d62b
--- /dev/null
+++ b/common/scala/src/main/resources/logback.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+ <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder>
+ <pattern>[%d{yyyy-MM-dd'T'HH:mm:ss.SSS'Z'}] [%p] %msg%n</pattern>
+ </encoder>
+ </appender>
+
+ <!-- Apache HttpClient -->
+ <logger name="org.apache.http" level="ERROR" />
+
+ <!-- Kafka -->
+ <logger name="org.apache.kafka" level="ERROR" />
+
+ <root level="info">
+ <appender-ref ref="console" />
+ </root>
+</configuration>
\ No newline at end of file
diff --git a/common/scala/src/main/resources/logging.conf b/common/scala/src/main/resources/logging.conf
index 1d85258..1882262 100644
--- a/common/scala/src/main/resources/logging.conf
+++ b/common/scala/src/main/resources/logging.conf
@@ -1,4 +1,5 @@
akka {
- loglevel = "INFO"
+ loglevel = "DEBUG"
loggers = ["akka.event.slf4j.Slf4jLogger"]
+ logging-filter = "akka.event.slf4j.Slf4jLoggingFilter"
}
--
To stop receiving notification emails like this one, please contact
['"commits@openwhisk.apache.org" <co...@openwhisk.apache.org>'].