logback-api.xml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. <!-- api server logback config start -->
  30. <appender name="APILOGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
  31. <file>${log.base}/dolphinscheduler-api-server.log</file>
  32. <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
  33. <level>INFO</level>
  34. </filter>
  35. <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
  36. <fileNamePattern>${log.base}/dolphinscheduler-api-server.%d{yyyy-MM-dd_HH}.%i.log</fileNamePattern>
  37. <maxHistory>168</maxHistory>
  38. <maxFileSize>64MB</maxFileSize>
  39. </rollingPolicy>
  40. <encoder>
  41. <pattern>
  42. [%level] %date{yyyy-MM-dd HH:mm:ss.SSS} %logger{96}:[%line] - %msg%n
  43. </pattern>
  44. <charset>UTF-8</charset>
  45. </encoder>
  46. </appender>
  47. <!-- api server logback config end -->
  48. <logger name="org.apache.zookeeper" level="WARN"/>
  49. <logger name="org.apache.hbase" level="WARN"/>
  50. <logger name="org.apache.hadoop" level="WARN"/>
  51. <root level="INFO">
  52. <appender-ref ref="STDOUT"/>
  53. <appender-ref ref="APILOGFILE"/>
  54. </root>
  55. </configuration>