logback-alert.xml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. ~ Licensed to the Apache Software Foundation (ASF) under one or more
  4. ~ contributor license agreements. See the NOTICE file distributed with
  5. ~ this work for additional information regarding copyright ownership.
  6. ~ The ASF licenses this file to You under the Apache License, Version 2.0
  7. ~ (the "License"); you may not use this file except in compliance with
  8. ~ the License. You may obtain a copy of the License at
  9. ~
  10. ~ http://www.apache.org/licenses/LICENSE-2.0
  11. ~
  12. ~ Unless required by applicable law or agreed to in writing, software
  13. ~ distributed under the License is distributed on an "AS IS" BASIS,
  14. ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. ~ See the License for the specific language governing permissions and
  16. ~ limitations under the License.
  17. -->
  18. <!-- Logback configuration. See http://logback.qos.ch/manual/index.html -->
  19. <configuration scan="true" scanPeriod="120 seconds"> <!--debug="true" -->
  20. <property name="log.base" value="logs"/>
  21. <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
  22. <encoder>
  23. <pattern>
  24. [%level] %date{yyyy-MM-dd HH:mm:ss.SSS} %logger{96}:[%line] - %msg%n
  25. </pattern>
  26. <charset>UTF-8</charset>
  27. </encoder>
  28. </appender>
  29. <appender name="ALERTLOGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
  30. <file>${log.base}/dolphinscheduler-alert.log</file>
  31. <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
  32. <fileNamePattern>${log.base}/dolphinscheduler-alert.%d{yyyy-MM-dd_HH}.%i.log</fileNamePattern>
  33. <maxHistory>20</maxHistory>
  34. <maxFileSize>64MB</maxFileSize>
  35. </rollingPolicy>
  36. <encoder>
  37. <pattern>
  38. [%level] %date{yyyy-MM-dd HH:mm:ss.SSS} %logger{96}:[%line] - %msg%n
  39. </pattern>
  40. <charset>UTF-8</charset>
  41. </encoder>
  42. </appender>
  43. <root level="INFO">
  44. <appender-ref ref="STDOUT"/>
  45. <appender-ref ref="APILOGFILE"/>
  46. </root>
  47. </configuration>