Home > Software engineering >  Structural Search for log.debug(String.format.... not working as expected
Structural Search for log.debug(String.format.... not working as expected

Time:03-30

I'm doing a search for the following

$Instance$.debug(String.format($Parameter$))

and found lots of instances from before we have a sensible logging framework in our project, however some calls are not being found and I don't understand what the difference is with those vs the ones that did get found. This didn't get found:

log.debug(
    String.format(
        "Failed to discard amendment (%s)", amendmentToDiscard.getID()),
    amendment_.getFields());

enter image description here

CodePudding user response:

Try the following template $Instance$.$MethodCall$($Parameter$):

enter image description here

  • Related