sharanggupta commented on PR #4414:
URL: https://github.com/apache/logging-log4j2/pull/4414#issuecomment-6321034836

   Good catch, thank you — you're right on both counts, and I verified it: 
`logger="com.foo."` and `logger=""` both stopped matching `com.foo.Bar` with my 
first version.
   
   Pushed a fix: an empty configured name (catch-all, matches everything) or 
one that already ends with `.` (the separator itself already supplies the 
hierarchy boundary) is now exempt from the extra boundary check, so a plain 
prefix match is used for those two cases — that's basically your suggested 
line, just reordered for short-circuiting. Added 
`testTrailingDotPrefixStillMatchesDescendant` and 
`testEmptyPrefixStillMatchesEveryLogger` (confirmed both fail against the 
previous commit and pass now), and updated `createPolicy`'s Javadoc and the 
`delegating.adoc` description, which still said "logger name prefix" / "start 
with this string" and didn't reflect the hierarchy-boundary semantics.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to