1. Oliver Tonnhofer
  2. mapproxy

Commits

Oliver Tonnhofer  committed d29cd16

add note about log.ini in wsgi-app template. closes #26

  • Participants
  • Parent commits d3a3c10
  • Branches default

Comments (0)

Files changed (2)

File mapproxy/config_template/base_config/config.wsgi

View file
 # WSGI module for use with Apache mod_wsgi or gunicorn
 
+# # uncomment the following lines for logging
+# # create a log.ini with `mapproxy-util create -t log-ini`
 # from logging.config import fileConfig
 # import os.path
-# fileConfig('./log.ini', {'here': os.path.dirname(__file__)})
+# fileConfig(r'%(here)s/log.ini', {'here': os.path.dirname(__file__)})
 
 from mapproxy.wsgiapp import make_wsgi_app
-application = make_wsgi_app(r'%s')
+application = make_wsgi_app(r'%(mapproxy_conf)s')

File mapproxy/script/util.py

View file
         template_dir = self.template_dir()
         app_template = open(os.path.join(template_dir, 'config.wsgi')).read()
         with open(app_filename, 'w') as f:
-            f.write(app_template % (mapproxy_conf, ))
+            f.write(app_template % {'mapproxy_conf': mapproxy_conf, 
+                'here': os.path.dirname(mapproxy_conf)})
         
         return 0