logback-console.xml 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <!--
  2. ~ Licensed to the Apache Software Foundation (ASF) under one
  3. ~ or more contributor license agreements. See the NOTICE file
  4. ~ distributed with this work for additional information
  5. ~ regarding copyright ownership. The ASF licenses this file
  6. ~ to you under the Apache License, Version 2.0 (the
  7. ~ "License"); you may not use this file except in compliance
  8. ~ with 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. <configuration>
  19. <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
  20. <encoder>
  21. <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{60} %X{sourceThread} - %msg%n</pattern>
  22. </encoder>
  23. <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
  24. <level>${console.log.level:-ALL}</level>
  25. </filter>
  26. </appender>
  27. <appender name="rolling" class="ch.qos.logback.core.rolling.RollingFileAppender">
  28. <file>${log.file}</file>
  29. <append>false</append>
  30. <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
  31. <fileNamePattern>${log.file}.%i</fileNamePattern>
  32. <minIndex>1</minIndex>
  33. <maxIndex>10</maxIndex>
  34. </rollingPolicy>
  35. <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
  36. <maxFileSize>100MB</maxFileSize>
  37. </triggeringPolicy>
  38. <encoder>
  39. <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{60} %X{sourceThread} - %msg%n</pattern>
  40. </encoder>
  41. </appender>
  42. <!-- This affects logging for both user code and Flink -->
  43. <root level="${ROOT_LOG_LEVEL:-INFO}">
  44. <appender-ref ref="console"/>
  45. <appender-ref ref="rolling"/>
  46. </root>
  47. <!-- Uncomment this if you want to only change Flink's logging -->
  48. <!--<logger name="org.apache.flink" level="INFO"/>-->
  49. <!-- The following lines keep the log level of common libraries/connectors on
  50. log level INFO. The root logger does not override this. You have to manually
  51. change the log levels here. -->
  52. <logger name="org.apache.pekko" level="INFO"/>
  53. <logger name="org.apache.kafka" level="INFO"/>
  54. <logger name="org.apache.hadoop" level="INFO"/>
  55. <logger name="org.apache.zookeeper" level="INFO"/>
  56. <!-- Suppress the irrelevant (wrong) warnings from the Netty channel handler -->
  57. <logger name="org.jboss.netty.channel.DefaultChannelPipeline" level="ERROR"/>
  58. </configuration>