mirror of https://github.com/apache/kafka.git
kafka-1285; enable log4j in unit test; patched by Jun Rao; reviewed by Neha Narkhede
This commit is contained in:
parent
8cdb234ad8
commit
220cc842a6
|
@ -16,6 +16,10 @@ Follow instuctions in http://kafka.apache.org/documentation.html#quickstart
|
|||
### Running a particular unit test ###
|
||||
./gradlew -Dtest.single=RequestResponseSerializationTest core:test
|
||||
|
||||
### Running a particular unit test with log4j output ###
|
||||
change the log4j setting in either clients/src/test/resources/log4j.properties or core/src/test/resources/log4j.properties
|
||||
./gradlew -i -Dtest.single=RequestResponseSerializationTest core:test
|
||||
|
||||
### Building a binary release gzipped tar ball ###
|
||||
./gradlew clean
|
||||
./gradlew releaseTarGz
|
||||
|
|
|
@ -20,6 +20,8 @@ buildscript {
|
|||
apply from: file('gradle/buildscript.gradle'), to: buildscript
|
||||
}
|
||||
|
||||
slf4jlog4j='org.slf4j:slf4j-log4j12:1.7.6'
|
||||
|
||||
allprojects {
|
||||
apply plugin: 'idea'
|
||||
repositories {
|
||||
|
@ -163,6 +165,7 @@ project(':core') {
|
|||
} else {
|
||||
testCompile "org.scalatest:scalatest_$scalaVersion:1.8"
|
||||
}
|
||||
testRuntime "$slf4jlog4j"
|
||||
|
||||
zinc 'com.typesafe.zinc:zinc:0.2.5'
|
||||
}
|
||||
|
@ -312,6 +315,7 @@ project(':clients') {
|
|||
dependencies {
|
||||
compile "org.slf4j:slf4j-api:1.7.6"
|
||||
testCompile 'com.novocode:junit-interface:0.9'
|
||||
testRuntime "$slf4jlog4j"
|
||||
}
|
||||
|
||||
jar {
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
# 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=OFF, stdout
|
||||
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.stdout.layout.ConversionPattern=[%d] %p %m (%c:%L)%n
|
||||
|
||||
log4j.logger.org.apache.kafka=ERROR
|
|
@ -19,6 +19,7 @@ log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
|||
log4j.appender.stdout.layout.ConversionPattern=[%d] %p %m (%c:%L)%n
|
||||
|
||||
log4j.logger.kafka=ERROR
|
||||
log4j.logger.org.apache.kafka=ERROR
|
||||
|
||||
# zkclient can be verbose, during debugging it is common to adjust is separately
|
||||
log4j.logger.org.I0Itec.zkclient.ZkClient=WARN
|
||||
|
|
Loading…
Reference in New Issue