拓恒统一认证授权服务
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.

69 lines
3.1KB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- 日志级别从低到高分为TRACE < DEBUG < INFO < WARN < ERROR < FATAL,如果设置为WARN,则低于WARN的信息都不会输出 -->
  3. <!-- scan:当此属性设置为true时,配置文档如果发生改变,将会被重新加载,默认值为true -->
  4. <!-- scanPeriod:设置监测配置文档是否有修改的时间间隔,如果没有给出时间单位,默认单位是毫秒。
  5. 当scan为true时,此属性生效。默认的时间间隔为1分钟。 -->
  6. <!-- debug:当此属性设置为true时,将打印出logback内部日志信息,实时查看logback运行状态。默认值为false。 -->
  7. <configuration scan="true" scanPeriod="60 seconds" debug="false">
  8. <!--
  9. contextName说明:
  10. 每个logger都关联到logger上下文,默认上下文名称为“default”。但可以使用设置成其他名字,
  11. 用于区分不同应用程序的记录。一旦设置,不能修改,可以通过%contextName来打印日志上下文名称。
  12. -->
  13. <contextName>tuoheng_oidc_server</contextName>
  14. <!--定义日志变量-->
  15. <!--<property name="logging.path" value="D:\\idealogs\\tuoheng_oidc"/>-->
  16. <property name="logging.path" value="/data/java/logs/tuoheng_oidc"/>
  17. <!--日志格式: [时间] [级别] [线程] [行号] [logger信息] - [日志信息]-->
  18. <property name="logging.pattern" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%level][%thread][%L] %logger - %msg%n"/>
  19. <property name="logging.charset" value="UTF-8"/>
  20. <property name="logging.maxHistory" value="15"/>
  21. <property name="logging.totalSizeCap" value="5GB"/>
  22. <property name="logging.maxFileSize" value="40MB"/>
  23. <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
  24. <encoder>
  25. <pattern>${logging.pattern}</pattern>
  26. <charset>${logging.charset}</charset>
  27. </encoder>
  28. </appender>
  29. <appender name="LOG_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
  30. <File>${logging.path}/server/tuoheng_oidc_server.log</File>
  31. <append>true</append>
  32. <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
  33. <fileNamePattern>${logging.path}/server/tuoheng_oidc_server-%d-%i.log</fileNamePattern>
  34. <!-- 最大保存天数-->
  35. <maxHistory>${logging.maxHistory}</maxHistory>
  36. <totalSizeCap>${logging.totalSizeCap}</totalSizeCap>
  37. <maxFileSize>${logging.maxFileSize}</maxFileSize>
  38. </rollingPolicy>
  39. <!--编码器-->
  40. <encoder>
  41. <pattern>${logging.pattern}</pattern>
  42. <charset>${logging.charset}</charset>
  43. </encoder>
  44. </appender>
  45. <appender name="file.async" class="ch.qos.logback.classic.AsyncAppender">
  46. <discardingThreshold>0</discardingThreshold>
  47. <queueSize>512</queueSize>
  48. <includeCallerData>true</includeCallerData>
  49. <appender-ref ref="LOG_FILE" />
  50. </appender>
  51. <logger name="com.tuoheng" level="DEBUG" additivity="false">
  52. <appender-ref ref="console" />
  53. <appender-ref ref="file.async" />
  54. </logger>
  55. <!--log4jdbc -->
  56. <logger name="jdbc.sqltiming" level="DEBUG" additivity="false">
  57. <appender-ref ref="file.async" />
  58. </logger>
  59. <root level="INFO">
  60. <appender-ref ref="console" />
  61. <appender-ref ref="file.async" />
  62. </root>
  63. </configuration>