qos-ch/logback — pull request #146 by chetanmeh (2013-09-10 05:10:56+00:00)
Title: LOGBACK-899 - Allow customising PackagingDataCalculator

Initial implementation for exposing an extension point for customizing the logic to determine Class Packaging Data.

1. Added a new interface ClassPackagingDataProvider to determine class related packaging data
2. Added an implementation for OSGi which makes use of FrameworkUtil to determine packaging data
3. Added an optional dependency on OSGI jar
4. Introduced a new variable in LoggerContext for providing a custom impl of ClassPackagingDataProvider.
Clients can then configure it to change the default provider. if specified the new provider is passed
to ThrowableProxy

Points to be considered

1. By default PackagingDataCalculator is not defined. It might be better to pass the PackagingDataCalculator as
part of constructor call for ThrowableProxy
2. PackagingDataCalculator is also used in ch.qos.logback.classic.spi.special.CPDCSpecialImpl. However
I did not find any usage of that so did not touched that.
3. Proposed change is backward compatible. By default logic uses a DefaultPackagingDataProvider which is
refactored code of current implementation