title: Using Relative Paths To Log Files In Pylons' development.ini
body: <p>I am working on a Pylons app that runs on top of Apache with mod_wsgi.  I would like to send logging messages that my app generates to files in my app's directory, instead of to Apache's logs.  Further, I would like to specify the location of logfiles via a relative path so that it'll be easier to deploy my app on other people's servers.  Right now I can log to files, but only via a fragile absolute path.</p>
  
  <p>Here is the relevant part of my development.ini file:</p>
  
  <pre><code># Logging configuration
  [loggers]
  keys = root, routes, myapp, sqlalchemy, debugging-logger
  
  [handlers]
  keys = console, debugging-logger-file
  
  [formatters]
  keys = generic
  
  [logger_debugging-logger]
  level = DEBUG
  handlers = debugging-logger-file
  qualname = myapp.controllers.logging-test-controller.debugging-logger
  
  [handler_debugging-logger-file]
  class = FileHandler
  args = ('/var/pylons/myapp/logs/myapp-debugging-errors.log', 'a')
  level = DEBUG
  formatter = generic
  </code></pre>
  
  <p>Although the .ini helpfully advises using %(here)s to refer to the current path, using %(here)s in the "args = ('foo')" line of the error handler does not behave the way that I expect it to.  The syntax of this ini file is <a href="http://pythonpaste.org/deploy/" rel="noreferrer">documented on the Paste Deploy site</a>, but does not specify how %(here)s can be used in relation to quoted strings.</p>
  
  <p>What syntax should I use in the "args = ('foo')" line to specify the current path?</p>