title: Log in Java with variable name?
body: <p>In a previous job, I was working in C++, and the company internal library had a logging macro where I could simply write LOG(<em>somevariable</em>), and it would output to standard out: </p>
  
  <p>"<em>variablename</em>: <em>variablevalue</em>"</p>
  
  <p>Does anyone know if there's a way to do this in Java?</p>
  
  <p>I never thought to look at their code so I don't know how it was done.  It was really useful though!</p>