title: node.js get relative to project/src path of file
body: <p>In my node.js project I use log4js and I want my logs to have name of the file where log record was added. So I use __filename but it gives me absolute path</p>
  
  <pre><code>var logger = log4js.getLogger(__filename)
  </code></pre>
  
  <p>So it gives me logs like this:</p>
  
  <pre><code>[1999-01-01 00:00:00] [DEBUG] /Users/whatever/myproject/src/services/users something happened
  </code></pre>
  
  <p>But I want the path to be relative to my project/src folder. Like this:</p>
  
  <pre><code>[1999-01-01 00:00:00] [DEBUG] services/users something happened
  </code></pre>
  
  <p>What is the best way to achieve this?</p>