diff docs/setup.rst @ 8086:488b52cad890 stable

logging: always invoke fileConfig with '__file__' and 'here' WSGI servers tend to provide '__file__' and 'here' as 'defaults' when invoking fileConfig, so '%(here)s' string interpolation also can be used in logging configuration. Make sure we do the same when we initialize logging without using a WSGI server. It is annoying to have to do this, and it will only in rare cases make any difference ... but it seems like the best option. Patch also modified by Mads Kiilerich.
author Wolfgang Scherer <Wolfgang.Scherer@gmx.de>
date Sun, 29 Dec 2019 17:35:13 +0100
parents 8e4d8a0bfc8a
children 7c7d6b5c07c7
line wrap: on
line diff
--- a/docs/setup.rst	Mon Dec 30 00:03:19 2019 +0100
+++ b/docs/setup.rst	Sun Dec 29 17:35:13 2019 +0100
@@ -562,7 +562,7 @@
 
       ini = '/srv/kallithea/my.ini'
       from logging.config import fileConfig
-      fileConfig(ini)
+      fileConfig(ini, {'__file__': ini, 'here': '/srv/kallithea'})
       from paste.deploy import loadapp
       application = loadapp('config:' + ini)
 
@@ -578,7 +578,7 @@
 
       ini = '/srv/kallithea/kallithea.ini'
       from logging.config import fileConfig
-      fileConfig(ini)
+      fileConfig(ini, {'__file__': ini, 'here': '/srv/kallithea'})
       from paste.deploy import loadapp
       application = loadapp('config:' + ini)