Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-1664

Missing logs with ConsoleAppender

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Blocker Blocker
    • None
    • None
    • None
    • None

    Description

      My application is deployed on k8s,I write logs to console so that I can get logs with kubectl logs -f. I have a method with Java which will print info logs , now I find that sometimes I couldn't find logs with kubectl logs -f  - missing logs.  Below is my config:

       <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
          <Target>System.out</Target>
          <encoder
                  class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
            <layout
                    class="ch.qos.logback.contrib.json.classic.JsonLayout">
              <jsonFormatter
                      class="ch.qos.logback.contrib.jackson.JacksonJsonFormatter">
                <prettyPrint>false</prettyPrint>
              </jsonFormatter>
            </layout>
          </encoder>
          <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
            <level>INFO</level>
          </filter>
        </appender> 
        <root level="INFO" >
          <appender-ref ref="CONSOLE" />
        </root>

      Attachments

        Activity

          People

            logback-dev Logback dev list
            rex rex
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: