Skip to content

Comments

fix: Store and return actual logger name in AntLoggerAdapter#8310

Merged
jeremylong merged 3 commits intoscratch/upgrade-loggersfrom
copilot/sub-pr-8306
Feb 18, 2026
Merged

fix: Store and return actual logger name in AntLoggerAdapter#8310
jeremylong merged 3 commits intoscratch/upgrade-loggersfrom
copilot/sub-pr-8306

Conversation

Copy link

Copilot AI commented Feb 17, 2026

Description of Change

AntLoggerAdapter#getName returned a hard-coded "dependency-check-ant" value, causing all loggers to appear under the same category regardless of the name SLF4J requested. This prevented log filtering by logger name.

Changes:

  • AntLoggerAdapter now accepts logger name via constructor and stores it as instance field
  • AntLoggerFactory#getLogger creates new instances with requested name instead of reusing singleton
  • Added null validation on logger name parameter

This preserves standard SLF4J behavior where each logger maintains its own name for proper filtering.

Related issues

Addresses review feedback from #8306 (comment thread #2817745021)

Have test cases been added to cover the new functionality?

No - existing integration tests cover logger functionality


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 17, 2026 15:57
Modified AntLoggerAdapter to accept logger name in constructor and return it from getName() instead of hard-coded value. Updated AntLoggerFactory to create new instances with the requested logger name. This allows proper log filtering by logger category.

Co-authored-by: jeremylong <862914+jeremylong@users.noreply.github.com>
Co-authored-by: jeremylong <862914+jeremylong@users.noreply.github.com>
@boring-cyborg boring-cyborg bot added the ant changes to ant label Feb 17, 2026
Copy link
Author

Copilot AI commented Feb 17, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • checkstyle.org
    • Triggering command: /opt/hostedtoolcache/CodeQL/2.24.1/x64/codeql/tools/linux64/java/bin/java /opt/hostedtoolcache/CodeQL/2.24.1/x64/codeql/tools/linux64/java/bin/java -jar /opt/hostedtoolcache/CodeQL/2.24.1/x64/codeql/xml/tools/xml-extractor.jar --fileList=/home/REDACTED/work/DependencyCheck/.codeql-scratch/dbs/java/working/files-to-index14912837302811063745.list --sourceArchiveDir=/home/REDACTED/work/DependencyCheck/.codeql-scratch/dbs/java/src --outputDir=/home/REDACTED/work/DependencyCheck/.codeql-scratch/dbs/java/trap/java (dns block)
  • dependency-check.github.io
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.12/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.12/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.12 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.12/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/DependencyCheck/DependencyCheck org.codehaus.plexus.classworlds.launcher.Launcher clean install -DskipTests -pl ant -am -q (dns block)
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.12/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.12/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.12 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.12/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/DependencyCheck/DependencyCheck org.codehaus.plexus.classworlds.launcher.Launcher clean install -DskipTests -Ddownload-maven-plugin.skip=true -pl ant -am -q (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Update slf4j and logback dependencies based on feedback fix: Store and return actual logger name in AntLoggerAdapter Feb 17, 2026
Copilot AI requested a review from jeremylong February 17, 2026 16:01
@jeremylong jeremylong marked this pull request as ready for review February 18, 2026 12:56
@jeremylong jeremylong merged commit ffb3408 into scratch/upgrade-loggers Feb 18, 2026
16 checks passed
@jeremylong jeremylong deleted the copilot/sub-pr-8306 branch February 18, 2026 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ant changes to ant

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants