Skip to content

Commit

Permalink
refactor(apollo-demo): use logback (#4163)
Browse files Browse the repository at this point in the history
  • Loading branch information
nobodyiam authored Dec 19, 2021
1 parent 259aa41 commit b2c101a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 42 deletions.
22 changes: 0 additions & 22 deletions apollo-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,34 +44,12 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j2</artifactId>
</dependency>
<!-- for refresh scope demo -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-context</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
</dependency>
<!-- take over jcl -->
<dependency>
<groupId>org.slf4j</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,12 @@
~ limitations under the License.
~
-->
<configuration monitorInterval="60">
<appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="[apollo-demo][%t]%d %-5p [%c] %m%n"/>
</Console>
<Async name="Async" includeLocation="true">
<AppenderRef ref="Console"/>
</Async>
</appenders>
<loggers>
<logger name="com.ctrip.framework.apollo" additivity="false" level="INFO">
<AppenderRef ref="Async"/>
</logger>
<logger name="com.ctrip.framework.apollo.demo" additivity="false" level="DEBUG">
<AppenderRef ref="Async"/>
</logger>
<root level="INFO">
<AppenderRef ref="Async"/>
</root>
</loggers>
<configuration>
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>
<logger name="com.ctrip.framework.apollo" level="INFO"/>
<logger name="com.ctrip.framework.apollo.demo" level="DEBUG"/>
<root level="INFO">
<appender-ref ref="CONSOLE"/>
</root>
</configuration>

0 comments on commit b2c101a

Please sign in to comment.