Review Board 1.7.22


SQOOP-826 Sqoop2: Add log4j test configuration to all maven modules

Review Request #8922 - Created Jan. 10, 2013 and submitted

Jarek Cecho
SQOOP-826
Reviewers
Sqoop
sqoop-sqoop2
I've added the same configuration file to every maven module that have type "jar" or "war" (e.g. not to "dummy" modules of type "pom"). Please note that the "debug" setting should be fine as this file should be loaded only during tests.
I've run tests and I can no longer see the log4j warnings of missing configuration file.

Steps that I've used to verify this patch:

1) Run mvn clean test

2) grep "Please initialize the log4j system properly" * -r | wc -l

3) Apply my patch

4) Rerun steps 1 and 2, output should be "0"
client/src/test/resources/log4j.properties
New File

    
   
1
# Licensed to the Apache Software Foundation (ASF) under one or more

    
   
2
# contributor license agreements.  See the NOTICE file distributed with

    
   
3
# this work for additional information regarding copyright ownership.

    
   
4
# The ASF licenses this file to You under the Apache License, Version 2.0

    
   
5
# (the "License"); you may not use this file except in compliance with

    
   
6
# the License.  You may obtain a copy of the License at

    
   
7
#

    
   
8
#      http://www.apache.org/licenses/LICENSE-2.0

    
   
9
#

    
   
10
# Unless required by applicable law or agreed to in writing, software

    
   
11
# distributed under the License is distributed on an "AS IS" BASIS,

    
   
12
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

    
   
13
# See the License for the specific language governing permissions and

    
   
14
# limitations under the License.

    
   
15

   

    
   
16
# Set root logger level to DEBUG and its only appender to A1.

    
   
17
log4j.rootLogger=DEBUG, A1

    
   
18

   

    
   
19
# A1 is set to be a ConsoleAppender.

    
   
20
log4j.appender.A1=org.apache.log4j.ConsoleAppender

    
   
21

   

    
   
22
# A1 uses PatternLayout.

    
   
23
log4j.appender.A1.layout=org.apache.log4j.PatternLayout

    
   
24
log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
common/src/test/resources/log4j.properties
New File
 
connector/connector-generic-jdbc/src/test/resources/log4j.properties
New File
 
core/src/test/resources/log4j.properties
New File
 
repository/repository-derby/src/test/resources/log4j.properties
New File
 
server/src/test/resources/log4j.properties
New File
 
spi/src/test/resources/log4j.properties
New File
 
submission/mapreduce/src/test/resources/log4j.properties
New File
 
  1. client/src/test/resources/log4j.properties: Loading...
  2. common/src/test/resources/log4j.properties: Loading...
  3. connector/connector-generic-jdbc/src/test/resources/log4j.properties: Loading...
  4. core/src/test/resources/log4j.properties: Loading...
  5. repository/repository-derby/src/test/resources/log4j.properties: Loading...
  6. server/src/test/resources/log4j.properties: Loading...
  7. spi/src/test/resources/log4j.properties: Loading...
  8. submission/mapreduce/src/test/resources/log4j.properties: Loading...