[
https://issues.apache.org/jira/browse/QPID-8793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18140966#comment-18140966
]
ASF GitHub Bot commented on QPID-8793:
--------------------------------------
usugumo opened a new pull request, #473:
URL: https://github.com/apache/qpid-broker-j/pull/473
**JIRA Issue**
[QPID-8793](https://issues.apache.org/jira/browse/QPID-8793): [Broker-J] Fix
rolled log file discovery with Logback 1.6.6
PR Description
The proposed fix derives the literal scan directory from the original
filename pattern and uses Logback’s generated regex to match paths relative to
that directory. Regression coverage includes special characters, relative
paths, date/index subdirectories, and exclusion of nonmatching files.
> [Broker-J] Fix rolled log file discovery with Logback 1.6.6
> -----------------------------------------------------------
>
> Key: QPID-8793
> URL: https://issues.apache.org/jira/browse/QPID-8793
> Project: Qpid
> Issue Type: Bug
> Components: Broker-J
> Reporter: Takahashi Kiyoshi
> Priority: Major
>
> After upgrading Logback from 1.6.3 to 1.6.6, RollingPolicyDecorator fails to
> discover rolled log files when a directory name contains regex
> metacharacters, including dots.
> Logback’s FileNamePattern.toRegex() now escapes literal regex metacharacters.
> Qpid extracts a filesystem directory from this regex, interpreting
> java-mms\.1-0 as the directory name instead of java-mms.1-0. It also applies
> Pattern.quote() to that escaped prefix, introducing another matching problem.
> The directory scan consequently returns an empty file list. This affects
> archive listings and downloads for both broker and virtual-host file loggers.
> The rollover operation itself remains delegated to Logback.
> To reproduce on the affected code:
>
> {code:java}
> mvn -pl broker-plugins/logging-logback test
> "-Dtest=RollingPolicyDecoratorTest" "-Dlogback-version=1.6.6"
> "-Djava.io.tmpdir=C:/Temp/qpid.logs"{code}
>
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]