Skip to content

Commit 07ebb9c

Browse files
authored
Merge pull request #630 from marklogic-community/feature/629-mlcp-logging
629: Changed MLCP example project to use logback
2 parents a3dcbce + 9ba3877 commit 07ebb9c

File tree

3 files changed

+26
-15
lines changed

3 files changed

+26
-15
lines changed

examples/mlcp-project/build.gradle

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ buildscript {
1010
mavenCentral()
1111
}
1212
dependencies {
13-
classpath "com.marklogic:ml-gradle:4.3.6"
13+
classpath "com.marklogic:ml-gradle:4.3.7-SNAPSHOT"
1414
}
1515
}
1616

@@ -29,14 +29,12 @@ configurations {
2929
}
3030

3131
dependencies {
32-
mlcp('com.marklogic:mlcp:10.0.9') {
33-
exclude group: 'log4j', module: 'log4j'
34-
}
32+
mlcp 'com.marklogic:mlcp:10.0.9.5'
3533

3634
/**
37-
* mlcp uses Log4j for logging, and if Log4j can't find a configuration file, it will complain and you'll
38-
* get none of mlcp's usually-useful logging. It is recommended then that your Gradle configuration for
39-
* mlcp include a directory or some other resource that provides a log4j.properties file.
35+
* mlcp uses logback for logging, and without a logback configuration file, no MLCP logging will appear.
36+
* It is recommended then that your Gradle configuration for mlcp include a directory or some other resource that
37+
* provides a logback configuration file.
4038
*/
4139
mlcp files("lib")
4240
}

examples/mlcp-project/lib/log4j.properties

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<configuration>
2+
3+
<statusListener class="ch.qos.logback.core.status.NopStatusListener" />
4+
5+
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
6+
<encoder>
7+
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
8+
</encoder>
9+
</appender>
10+
11+
<root level="INFO">
12+
<appender-ref ref="STDOUT" />
13+
</root>
14+
15+
<logger name="com.marklogic" level="INFO" additivity="false">
16+
<appender-ref ref="STDOUT" />
17+
</logger>
18+
19+
</configuration>
20+
21+

0 commit comments

Comments
 (0)