You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
2.9 KiB

1 year ago
  1. <Configuration status="INFO" packages="com.digiwin.app.log">
  2. <Properties>
  3. <Property name="LOG_PATTERN">
  4. %d{yyyy/MM/dd HH:mm:ss} %-5p [%X{traceId}] %m%n
  5. </Property>
  6. </Properties>
  7. <Appenders>
  8. <Console name="consoleAppender" target="SYSTEM_OUT" follow="true">
  9. <PatternLayout pattern="${LOG_PATTERN}" />
  10. </Console>
  11. <RollingFile name="rollingfileAppender" fileName="platform/log/Digiwin${sys:logFileIdentifier}.log"
  12. filePattern="platform/log/Digiwin${sys:logFileIdentifier}-%d{yyyy-MM-dd}.log" append="true">
  13. <PatternLayout pattern="${LOG_PATTERN}" />
  14. <Filters>
  15. <ThresholdFilter level="fatal" onMatch="ACCEPT"
  16. onMismatch="NEUTRAL" />
  17. <ThresholdFilter level="error" onMatch="ACCEPT"
  18. onMismatch="NEUTRAL" />
  19. <ThresholdFilter level="warn" onMatch="ACCEPT"
  20. onMismatch="NEUTRAL" />
  21. <ThresholdFilter level="info" onMatch="ACCEPT"
  22. onMismatch="NEUTRAL" />
  23. <ThresholdFilter level="debug" onMatch="ACCEPT"
  24. onMismatch="DENY" />
  25. </Filters>
  26. <Policies>
  27. <TimeBasedTriggeringPolicy />
  28. </Policies>
  29. <DefaultRolloverStrategy>
  30. <Delete basePath="platform/log/" maxDepth="1" followLinks="true">
  31. <IfFileName glob="Digiwin-*.log" />
  32. <IfLastModified age="@logFileReservedDay@" />
  33. </Delete>
  34. </DefaultRolloverStrategy>
  35. </RollingFile>
  36. <!-- DwMongoDBAppender name="logServiceLogAppender" databaseName="dap" collectionName="logs" server="@logMongodbServer@" port="@logMongodbPort@">
  37. <PatternLayout pattern="${LOG_PATTERN}" />
  38. </DwMongoDBAppender>
  39. <DwMongoDBAppender name="logServiceTraceAppender" databaseName="dap" collectionName="traces" server="@logMongodbServer@" port="@logMongodbPort@">
  40. <PatternLayout pattern="${LOG_PATTERN}" />
  41. </DwMongoDBAppender>
  42. <DwLogMongoAppender name="mongoSysAppender" databaseName="dap" collectionName="logs" server="@logMongodbServer@" port="@logMongodbPort@">
  43. <PatternLayout pattern="${LOG_PATTERN}" />
  44. </DwLogMongoAppender>
  45. <Async name="asyncSysAppender">
  46. <AppenderRef ref="mongoSysAppender"/>
  47. </Async-->
  48. </Appenders>
  49. <Loggers>
  50. <Root level="@logLevel@">
  51. <appender-ref ref="consoleAppender" />
  52. <appender-ref ref="rollingfileAppender" />
  53. <!-- appender-ref ref="asyncSysAppender" /-->
  54. </Root>
  55. <logger name="io.lettuce.core.protocol" level="ERROR">
  56. <appender-ref ref="consoleAppender" />
  57. <appender-ref ref="rollingfileAppender" />
  58. </logger>
  59. <!-- Logger name="com.digiwin.dwsys.service.impl.LogLogger" level="@logLevel@" additivity="false">
  60. <appender-ref ref="logServiceLogAppender" />
  61. </Logger>
  62. <Logger name="com.digiwin.dwsys.service.impl.TraceLogger" level="@logLevel@" additivity="false">
  63. <appender-ref ref="logServiceTraceAppender" />
  64. </Logger>
  65. <Logger name="org.mongodb.driver" level="ERROR" additivity="false">
  66. <appender-ref ref="rollingfileAppender" />
  67. </Logger-->
  68. </Loggers>
  69. </Configuration>