Skip to content

Commit f69422c

Browse files
committed
Adding log4j as a test-dependency for all modules.
#### Problem For all tests there is no logger implementation and hence it is difficult to debug the tests sometimes. #### Modification Added a `testCompile` dependency on log4j for all modules and log4j configuration file. #### Result No more "no logger found" warning and logs configured.
1 parent 369d296 commit f69422c

File tree

11 files changed

+201
-103
lines changed

11 files changed

+201
-103
lines changed

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ subprojects {
4545
testCompile 'org.mockito:mockito-core:1.10.19'
4646
testCompile "org.hamcrest:hamcrest-library:1.3"
4747
testCompile 'io.reactivex.rxjava2:rxjava:2.0.0-RC5'
48+
testCompile 'org.slf4j:slf4j-log4j12:1.7.21'
4849
}
4950

5051
test {
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#
2+
# Copyright 2016 Netflix, Inc.
3+
# <p>
4+
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
# the License. You may obtain a copy of the License at
6+
# <p>
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
# <p>
9+
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
# specific language governing permissions and limitations under the License.
12+
#
13+
14+
15+
#
16+
#
17+
# Licensed under the Apache License, Version 2.0 (the "License");
18+
# you may not use this file except in compliance with the License.
19+
# You may obtain a copy of the License at
20+
#
21+
# http://www.apache.org/licenses/LICENSE-2.0
22+
#
23+
# Unless required by applicable law or agreed to in writing, software
24+
# distributed under the License is distributed on an "AS IS" BASIS,
25+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26+
# See the License for the specific language governing permissions and
27+
# limitations under the License.
28+
#
29+
log4j.rootLogger=INFO, stdout
30+
31+
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
32+
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
33+
log4j.appender.stdout.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss,SSS} %5p [%t] (%F:%L) - %m%n
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#
2+
# Copyright 2016 Netflix, Inc.
3+
# <p>
4+
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
# the License. You may obtain a copy of the License at
6+
# <p>
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
# <p>
9+
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
# specific language governing permissions and limitations under the License.
12+
#
13+
14+
15+
#
16+
#
17+
# Licensed under the Apache License, Version 2.0 (the "License");
18+
# you may not use this file except in compliance with the License.
19+
# You may obtain a copy of the License at
20+
#
21+
# http://www.apache.org/licenses/LICENSE-2.0
22+
#
23+
# Unless required by applicable law or agreed to in writing, software
24+
# distributed under the License is distributed on an "AS IS" BASIS,
25+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26+
# See the License for the specific language governing permissions and
27+
# limitations under the License.
28+
#
29+
log4j.rootLogger=INFO, stdout
30+
31+
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
32+
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
33+
log4j.appender.stdout.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss,SSS} %5p [%t] (%F:%L) - %m%n
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#
2+
# Copyright 2016 Netflix, Inc.
3+
# <p>
4+
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
# the License. You may obtain a copy of the License at
6+
# <p>
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
# <p>
9+
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
# specific language governing permissions and limitations under the License.
12+
#
13+
14+
15+
#
16+
#
17+
# Licensed under the Apache License, Version 2.0 (the "License");
18+
# you may not use this file except in compliance with the License.
19+
# You may obtain a copy of the License at
20+
#
21+
# http://www.apache.org/licenses/LICENSE-2.0
22+
#
23+
# Unless required by applicable law or agreed to in writing, software
24+
# distributed under the License is distributed on an "AS IS" BASIS,
25+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26+
# See the License for the specific language governing permissions and
27+
# limitations under the License.
28+
#
29+
log4j.rootLogger=INFO, stdout
30+
31+
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
32+
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
33+
log4j.appender.stdout.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss,SSS} %5p [%t] (%F:%L) - %m%n

reactivesocket-examples/src/main/resources/log4j.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ log4j.rootLogger=INFO, stdout
1717

1818
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
1919
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
20-
log4j.appender.stdout.layout.ConversionPattern=%c %d{dd MMM yyyy HH:mm:ss,SSS} %5p [%t] (%F:%L) - %m%n
20+
log4j.appender.stdout.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss,SSS} %5p [%t] (%F:%L) - %m%n
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#
2+
# Copyright 2016 Netflix, Inc.
3+
# <p>
4+
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
# the License. You may obtain a copy of the License at
6+
# <p>
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
# <p>
9+
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
# specific language governing permissions and limitations under the License.
12+
#
13+
14+
15+
#
16+
#
17+
# Licensed under the Apache License, Version 2.0 (the "License");
18+
# you may not use this file except in compliance with the License.
19+
# You may obtain a copy of the License at
20+
#
21+
# http://www.apache.org/licenses/LICENSE-2.0
22+
#
23+
# Unless required by applicable law or agreed to in writing, software
24+
# distributed under the License is distributed on an "AS IS" BASIS,
25+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26+
# See the License for the specific language governing permissions and
27+
# limitations under the License.
28+
#
29+
log4j.rootLogger=INFO, stdout
30+
31+
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
32+
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
33+
log4j.appender.stdout.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss,SSS} %5p [%t] (%F:%L) - %m%n
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#
2+
# Copyright 2016 Netflix, Inc.
3+
# <p>
4+
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
# the License. You may obtain a copy of the License at
6+
# <p>
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
# <p>
9+
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
# specific language governing permissions and limitations under the License.
12+
#
13+
14+
15+
#
16+
#
17+
# Licensed under the Apache License, Version 2.0 (the "License");
18+
# you may not use this file except in compliance with the License.
19+
# You may obtain a copy of the License at
20+
#
21+
# http://www.apache.org/licenses/LICENSE-2.0
22+
#
23+
# Unless required by applicable law or agreed to in writing, software
24+
# distributed under the License is distributed on an "AS IS" BASIS,
25+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26+
# See the License for the specific language governing permissions and
27+
# limitations under the License.
28+
#
29+
log4j.rootLogger=INFO, stdout
30+
31+
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
32+
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
33+
log4j.appender.stdout.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss,SSS} %5p [%t] (%F:%L) - %m%n

reactivesocket-transport-aeron/src/test/resources/simplelogger.properties

Lines changed: 0 additions & 51 deletions
This file was deleted.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#
2+
# Copyright 2016 Netflix, Inc.
3+
# <p>
4+
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
# the License. You may obtain a copy of the License at
6+
# <p>
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
# <p>
9+
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
# specific language governing permissions and limitations under the License.
12+
#
13+
log4j.rootLogger=INFO, stdout
14+
15+
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
16+
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
17+
log4j.appender.stdout.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss,SSS} %5p [%t] (%F:%L) - %m%n
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#
2+
# Copyright 2016 Netflix, Inc.
3+
# <p>
4+
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
# the License. You may obtain a copy of the License at
6+
# <p>
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
# <p>
9+
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
# specific language governing permissions and limitations under the License.
12+
#
13+
log4j.rootLogger=INFO, stdout
14+
15+
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
16+
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
17+
log4j.appender.stdout.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss,SSS} %5p [%t] (%F:%L) - %m%n

reactivesocket-transport-tcp/src/test/resources/simplelogger.properties

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)