title: How to log every executed line of code in Java for debug purposes
body: <p>I am using a third party open source library for authentication in my web app.  Its logging is lacking to say the least.  I do have the code (its on github) and can find choice locations in the code to log but I was wondering if there is a quick way to alter the byte-code to log each line of code?  Similar to Jacoco or Clover, except its for logging and not code coverage.  I assumed there would have been a top search result for this on Google or Stackoverflow but maybe I am not using the right search query.</p>
  
  <p>So far I took the code from github and created an uber jar of it using Shades Maven plugin.  So all the code byte code, and its dependencies are in one jar file.</p>
  
  <p>EDIT:  To answer the question of why I would want to do this.  The library has a lot of classes.  Essentially its very time consuming to find where the problem could be.  And while I am wasting time typing this question and can be finding the best places to log, I want the answer because if I come across this in the future I would like to use this same approach.  If I add the logging manually, I would have to compile, and deploy, then when I see that I logged the wrong lines or now need to log more lines, then I would rinse/repeat till I hunt down the culprit.  This is more than just solving this immediate problem, this is something that should be doable within Java's various tools and I want to know how to do it, so please keep answers related to solving my question and not providing workarounds.</p>