Remove Logback from production JAR
Move Logback dependency to test scope to make it possible for applications using this library to choose their implementation of the SLF4J API. For example, Spring Boot provides one out of the box already. Fixes gh-49 Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
This commit is contained in:
parent
580f95526f
commit
68ae239552
3 changed files with 8 additions and 7 deletions
13
mcp/pom.xml
13
mcp/pom.xml
|
|
@ -27,12 +27,6 @@
|
|||
<version>${slf4j-api.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
<version>${logback.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
|
|
@ -112,6 +106,13 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
<version>${logback.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
|
|
|
|||
31
mcp/src/test/resources/logback.xml
Normal file
31
mcp/src/test/resources/logback.xml
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE configuration>
|
||||
|
||||
<configuration>
|
||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- Main MCP package -->
|
||||
<logger name="org.springframework.ai.mcp" level="INFO"/>
|
||||
|
||||
<!-- Client packages -->
|
||||
<logger name="org.springframework.ai.mcp.client" level="INFO"/>
|
||||
<logger name="org.springframework.ai.mcp.client.sse" level="INFO"/>
|
||||
<logger name="org.springframework.ai.mcp.client.stdio" level="INFO"/>
|
||||
|
||||
<!-- Spec package -->
|
||||
<logger name="org.springframework.ai.mcp.spec" level="INFO"/>
|
||||
|
||||
<!-- Test packages -->
|
||||
<logger name="org.springframework.ai.mcp.client.sse.SseClientTransportTests" level="DEBUG"/>
|
||||
<logger name="org.springframework.ai.mcp.client.stdio.McpAsyncClientTests" level="DEBUG"/>
|
||||
<logger name="org.springframework.ai.mcp.client.stdio.McpSyncClientTests" level="DEBUG"/>
|
||||
|
||||
<!-- Root logger -->
|
||||
<root level="INFO">
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
</root>
|
||||
</configuration>
|
||||
2
pom.xml
2
pom.xml
|
|
@ -73,7 +73,7 @@
|
|||
<testcontainers.version>1.20.4</testcontainers.version>
|
||||
|
||||
<slf4j-api.version>2.0.16</slf4j-api.version>
|
||||
<logback.version>1.5.12</logback.version>
|
||||
<logback.version>1.5.15</logback.version>
|
||||
<jackson.version>2.17.0</jackson.version>
|
||||
<springframework.version>6.2.1</springframework.version>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue