title: Clojure: Debugging Println, __LINE_NUMBER__ and __FILE_NAME__
body: <h2>Context</h2>
  
  <p>Currently,</p>
  
  <pre><code>(println "x is" x)
  </code></pre>
  
  <p>just prints out</p>
  
  <pre><code>x is 10
  </code></pre>
  
  <p>Now, what I want is something like this:</p>
  
  <pre><code>(my-println "x is" x)
  </code></pre>
  
  <p>to print out:</p>
  
  <pre><code>foo.clj:23&gt; x is 10
  </code></pre>
  
  <p>Informally, I want my-println to append the _FILE_NAME_ and _LINE_NUMBER_ into my println.</p>
  
  <h2>Question:</h2>
  
  <p>I know how to use macros. However, I don't know how to extract the _FILE_NAME_ and _LINE_NUMBER_ from the current location in Clojure (whereas C macros make this trivial to do). How do I get the current FILE_NAME_ and _LINE_NUMBER_ ?</p>
  
  <p>Thanks.</p>