Skip to content

Commit

Permalink
Improve debug logs for lookup/resolve
Browse files Browse the repository at this point in the history
  • Loading branch information
pron committed Sep 8, 2015
1 parent 47b6bd0 commit 5a92500
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions capsule/src/main/java/Capsule.java
Expand Up @@ -3246,7 +3246,12 @@ protected final Object lookup(String x, Entry<String, ?> attrContext) {
* @deprecated exclude from javadocs
*/
protected Object lookup0(Object x, String type, Entry<String, ?> attrContext, Object context) {
return (_ct = unsafe(getCallTarget(Capsule.class))) != null ? _ct.lookup0(x, type, attrContext, context) : lookup00(x, type, attrContext, context);
_ct = unsafe(getCallTarget(Capsule.class));
final String target = (_ct != null ? _ct.getClass().getName() : Capsule.class.getName()) + '@' + Integer.toHexString(System.identityHashCode(_ct));
log(LOG_DEBUG, "lookup0 " + target + " " + x);
final Object res = _ct != null ? _ct.lookup0(x, type, attrContext, context) : lookup00(x, type, attrContext, context);
log(LOG_DEBUG, "lookup0 " + target + " " + x + " -> " + res);
return res;
}

private Object lookup00(Object x, String type, Entry<String, ?> attrContext, Object context) {
Expand Down Expand Up @@ -3319,7 +3324,7 @@ private List<Path> resolve(List<Object> ps) {
*/
protected List<Path> resolve0(Object x) {
_ct = unsafe(getCallTarget(Capsule.class));
final String target = (_ct != null ? _ct.getClass().getName() : Capsule.class.getName());
final String target = (_ct != null ? _ct.getClass().getName() : Capsule.class.getName()) + '@' + Integer.toHexString(System.identityHashCode(_ct));
log(LOG_DEBUG, "resolve0 " + target + " " + x);
final List<Path> res = _ct != null ? _ct.resolve0(x) : resolve00(x);
log(LOG_DEBUG, "resolve0 " + target + " " + x + " -> " + res);
Expand Down

0 comments on commit 5a92500

Please sign in to comment.