Skip to content

Commit

Permalink
implement logUsesConstraintViolation
Browse files Browse the repository at this point in the history
the default impl in the inherited base class is empty. Thus nothing was logged. Overriding this impl and actually logging something here now.

Signed-off-by: Christoph Rueger <chrisrueger@gmail.com>
  • Loading branch information
chrisrueger committed May 11, 2024
1 parent cd0ea42 commit 53a0eae
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package biz.aQute.resolve;

import org.apache.felix.resolver.Logger;
import org.apache.felix.resolver.ResolutionError;
import org.osgi.resource.Resource;

class InternalResolverLogger extends Logger {

Expand All @@ -15,4 +17,10 @@ public InternalResolverLogger(ResolverLogger logger) {
protected void doLog(int level, String msg, Throwable throwable) {
logger.log(level, msg, throwable);
}

@Override
public void logUsesConstraintViolation(Resource resource, ResolutionError error) {
logger.log(logger.getLogLevel(), String.format("Resource: %s, ResolutionError: %s", resource, error),
error.toException());
}
}

0 comments on commit 53a0eae

Please sign in to comment.