[JENKINS-26118] Add details and optimize logging

Not tested atm.