Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: qos-ch/logback
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v_1.6.5
Choose a base ref
...
head repository: qos-ch/logback
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v_1.6.6
Choose a head ref
  • 16 commits
  • 36 files changed
  • 5 contributors

Commits on Sep 30, 2026

  1. start work on 1.6.6-SNAPSHOT

    Signed-off-by: ceki <[email protected]>
    ceki committed Sep 30, 2026
    Configuration menu
    Copy the full SHA
    8099e42 View commit details
    Browse the repository at this point in the history

Commits on Oct 13, 2026

  1. fix: stop the encoder when an OutputStreamAppender is stopped (#1072)

    * Stop the encoder when an OutputStreamAppender is stopped
    
    OutputStreamAppender.stop() wrote the footer and closed the stream but never
    stopped its encoder. Encoders that hold resources until stop(), such as
    logstash-logback-encoder's per-thread JsonGenerator/buffer holders, were
    therefore never released. Each context reset (e.g. scan="true"
    reconfiguration) left the previous encoder behind together with one buffer per
    thread that had logged through it, causing steady heap growth on long-lived
    applications.
    
    The encoder is now stopped after the footer is written and the stream closed.
    Already stopped encoders are left untouched.
    
    Signed-off-by: Samuel Fernandes <[email protected]>
    
    * chore: simple unit test
    
    Signed-off-by: Samuel Fernandes <[email protected]>
    
    ---------
    
    Signed-off-by: Samuel Fernandes <[email protected]>
    samyuh authored and ceki committed Oct 13, 2026
    Configuration menu
    Copy the full SHA
    c33d2cb View commit details
    Browse the repository at this point in the history
  2. ask for parallel builds

    Signed-off-by: ceki <[email protected]>
    ceki committed Oct 13, 2026
    Configuration menu
    Copy the full SHA
    10331ef View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2026

  1. Connect SyslogOutputStream's DatagramSocket to the syslog host (#939)

    SyslogOutputStream created its DatagramSocket with the no-arg constructor,
    which binds an ephemeral port on the wildcard address. The appender holds
    that socket for its whole lifetime, so hardened environments see an
    unconnected UDP listener on all interfaces (ss -ulnp) for as long as the
    application runs.
    
    This stream only ever sends datagrams to one host:port, so the socket is
    now connected to that address. A connected UDP socket is reported as
    connected to its peer instead of listening on the wildcard, while the OS
    still selects the source address per routing table - remote syslog targets
    are unaffected. The issue's suggestion of binding to localhost was not
    followed, as loopback-sourced packets are dropped by remote receivers.
    
    SyslogOutputStreamTest asserts the connected state and, on a real local
    DatagramSocket, that flush() still delivers the datagram.
    
    Closes #939
    Lyin-OTTF authored and ceki committed Oct 19, 2026
    Configuration menu
    Copy the full SHA
    a4fdeff View commit details
    Browse the repository at this point in the history
  2. unit test methods should be public

    Signed-off-by: ceki <[email protected]>
    ceki committed Oct 19, 2026
    Configuration menu
    Copy the full SHA
    25d556e View commit details
    Browse the repository at this point in the history
  3. make connected SyslogOutputStream robust to connect and ICMP errors (#…

    …939)
    
      Follow-up to 619e102, which connects the DatagramSocket of
      SyslogOutputStream to the syslog host.
    
      - If connect() throws a SocketException, e.g. because the network is not
        yet available, fall back to an unconnected socket instead of failing
        the constructor, which previously left SyslogAppenderBase started with
        a null output stream. SyslogAppenderBase.start() reports the failure
        as a warning.
    
      - On a connected socket, an ICMP port unreachable message caused by an
        earlier datagram is reported on the next send() as a
        PortUnreachableException, and the current packet is not sent.
        flush() now retries once so that no message is lost, as with
        unconnected sockets. If the retry fails too, SyslogAppenderBase
        reports a single warning per start() instead of one error per event.
    
      - Rename SyslogOutputStream.isInvalidState() to isValidState()
        (package-private).
    
      - SyslogOutputStreamTest: add tests for the connect fallback and for
        flushing to an unreachable port. The latter is skipped on platforms
        which do not report ICMP errors on connected datagram sockets.
    
    Signed-off-by: ceki <[email protected]>
    ceki committed Oct 19, 2026
    Configuration menu
    Copy the full SHA
    5491685 View commit details
    Browse the repository at this point in the history

Commits on Oct 24, 2026

  1. Escape regex metacharacters of literal text in FileNamePattern regexes

    FileNamePattern.toRegex() and toRegexForFixedDate() copied the literal
    parts of the file name pattern, and the formatted date, into the regex
    unchanged. Characters such as '(', '[' or '+' in a directory or file
    name were therefore interpreted as regex syntax:
    
    - RollingFileAppender.start() threw a PatternSyntaxException when the
      path contained an unbalanced '(', e.g. a Windows user directory such
      as "C:/Users/Michael(Financ" (#914).
    
    - With SizeAndTimeBasedRollingPolicy and a pattern such as
      "app.%d.(%i).log", the regex did not match existing archives. After a
      restart within the same period the counter started again at 0, so the
      next size based rollover renamed the active file onto the existing
      archive "(0)" and its content was lost. maxHistory and totalSizeCap
      never removed such archives either (#933).
    
    Literal characters with a special meaning in regular expressions are
    now escaped one by one. Pattern.quote() is not used because callers keep
    only the part of the regex after the last '/'.
    
    The strings returned by toRegex() and toRegexForFixedDate() change
    accordingly, e.g. "foo-2003.05.20-(\d+).txt" becomes
    "foo-2003\.05\.20-(\d+)\.txt".
    
    Fixes #914
    Fixes #933
    
    Signed-off-by: Jialin Chen <[email protected]>
    CCCLL authored and ceki committed Oct 24, 2026
    Configuration menu
    Copy the full SHA
    b4b4828 View commit details
    Browse the repository at this point in the history
  2. Align date pattern to regex conversion with DateTimeFormatter

      CachingDateFormatter formats dates with DateTimeFormatter, but the
      regex conversion and its documentation still assumed SimpleDateFormat.
    
      - support the 'L' (stand-alone month) pattern letter in
        CharSequenceToRegexMapper
      - add DatePatternToRegexUtil(String, Locale) so that symbols can be
        taken from a locale other than the default one
      - FileNamePattern.toRegexForFixedDate(Date) now delegates to the
        Instant overload
      - add DatePatternToRegexUtilTest, checking that dates formatted in
        16 locales match their regex
      - check the regex against DateTimeFormatter output in
        DatePatternToRegexTest
    
    Signed-off-by: ceki <[email protected]>
    ceki committed Oct 24, 2026
    Configuration menu
    Copy the full SHA
    d268774 View commit details
    Browse the repository at this point in the history
  3. Escape regex metacharacters in date patterns, harden rolling tests

      - escape regex metacharacters in %d{...} date patterns converted to
        regex; repeated dots now yield \.{n}
      - RollingFileAppender: warn instead of failing start() when the
        file/fileNamePattern collision regex is invalid
      - test archive removal with "(%i)" in fileNamePattern (#933)
      - MultiThreadedRollingTest: verify output in Java instead of bash, and
        set a 10 ms check increment so that size based rollover occurs
      - remove a redundant 100 ms sleep in
        TimeBasedRollingWithArchiveRemoval_Test
      - surefire: JUnit module flags for parameterized tests in IDEs; drop
        parallel/threadCount, which the JUnit Platform provider ignores
    
    Signed-off-by: ceki <[email protected]>
    ceki committed Oct 24, 2026
    Configuration menu
    Copy the full SHA
    7c36c71 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5c1f577 View commit details
    Browse the repository at this point in the history
  5. LOGBACK-1337 LogbackMDCAdapter should store mdc in LinkedHashMap to …

    …predict order of MDC in %X
    
    Signed-off-by: Craig P. Motlin <[email protected]>
    ceki committed Oct 24, 2026
    Configuration menu
    Copy the full SHA
    0b95858 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    6217f11 View commit details
    Browse the repository at this point in the history
  7. reject cyclic throwable proxies in LoggingEventVO.readObject

    ThrowableProxyVO.build() only produces trees, but a crafted stream sent
    to a socket receiver can use serialization back-references to make a
    cause or suppressed entry point at another proxy, e.g. its own parent.
    DefaultThrowableRenderer and SyslogAppender then walk the cause chain
    forever, and the recursive converters overflow the stack.
    
    Reject such graphs with InvalidObjectException, next to the existing
    argument array length check.
    
    Signed-off-by: arfa k <[email protected]>
    arfa-21 authored and ceki committed Oct 24, 2026
    Configuration menu
    Copy the full SHA
    c7b8e2f View commit details
    Browse the repository at this point in the history
  8. Test round trip of circular exceptions through LoggingEventVO

      Check that genuinely circular exceptions, and exceptions reaching the
      same throwable twice, still deserialize now that cyclic or shared
      throwable proxies are rejected. Replace reflection in the test with a
      package-private LoggingEventVO.setThrowableProxyVO().
    
    Signed-off-by: ceki <[email protected]>
    ceki committed Oct 24, 2026
    Configuration menu
    Copy the full SHA
    355b931 View commit details
    Browse the repository at this point in the history
  9. throw ScanException on unmatched '}' during variable substitution, f…

    …ixes #836
    
      Previously, Parser.parse() stopped at an unmatched right accolade and
      silently dropped it along with the rest of the input, e.g. the pattern
      "%m}some text" was truncated to "%m". The parser now throws a
      ScanException with the message "Unmatched right accolade '}'". Joran
      callers already catch ScanException, report an error and keep the
      original value.
    
      Also remove a stray '}' in the input of the oss-fuzz regression test
      OptionHelperTest.recursionErrorWithNullLiteralPayload, which would now
      trip the new check before reaching the circular reference detection.
    
    Signed-off-by: ceki <[email protected]>
    ceki committed Oct 24, 2026
    Configuration menu
    Copy the full SHA
    7fa8e8e View commit details
    Browse the repository at this point in the history

Commits on Oct 25, 2026

  1. prepare release 1.6.6

    Signed-off-by: ceki <[email protected]>
    ceki committed Oct 25, 2026
    Configuration menu
    Copy the full SHA
    a9ee801 View commit details
    Browse the repository at this point in the history
Loading