Browse Source

接入日志中心

clong 1 year ago
parent
commit
87155ebc0b
2 changed files with 23 additions and 2 deletions
  1. +16
    -2
      demo-athenaopt_backend/develop/conf/log4j2.xml
  2. +7
    -0
      demo-athenaopt_backend/pom.xml

+ 16
- 2
demo-athenaopt_backend/develop/conf/log4j2.xml View File

@ -48,9 +48,23 @@
<Async name="asyncSysAppender">
<AppenderRef ref="mongoSysAppender"/>
</Async-->
<!-- 1.引入appender -->
<DwLog4j2Appender name="dwAppender" app="demo-athenaopt" endpoint="https://lmc-hw-test.digiwincloud.com.cn">
<PatternLayout pattern="${LOG_PATTERN}"/>
</DwLog4j2Appender>
<!-- 2.引入异步节点 -->
<Async name="ASYNC-dwAppender">
<AppenderRef ref="dwAppender"/>
</Async>
</Appenders>
<Loggers>
<Root level="@logLevel@">
<Loggers>
<Root level="ERROR">
<!-- 3.引入使用 -->
<appender-ref ref="ASYNC-dwAppender"/>
<!--<Root level="@logLevel@"> -->
<appender-ref ref="consoleAppender" />
<appender-ref ref="rollingfileAppender" />
<!-- appender-ref ref="asyncSysAppender" /-->


+ 7
- 0
demo-athenaopt_backend/pom.xml View File

@ -50,6 +50,13 @@
</exclusions>
</dependency>
<!--引入 lmc-sdk-log4j2-->
<dependency>
<groupId>com.digiwin.dap.middleware</groupId>
<artifactId>lmc-sdk-log4j2</artifactId>
<version>2.2.0.0</version>
</dependency>
<dependency>
<groupId>com.digiwin</groupId>
<artifactId>dwapiplatform-simplified-starter</artifactId>


Loading…
Cancel
Save