Add log filename to config

This commit is contained in:
jar3b 2016-03-15 12:59:33 +03:00
parent 255f895993
commit 356bcf74c4
4 changed files with 7 additions and 2 deletions

View File

@ -2,6 +2,7 @@
class basic:
logging = False
logfile = ""
class sphinx_conf:

View File

@ -15,6 +15,9 @@ class App(BottleCL):
self._factory = FiasFactory()
def get_app(self):
return self._app
def init_routes(self):
self.add_route(r'/expand/<aoid:re:[\w]{8}(-[\w]{4}){3}-[\w]{12}>', self.__expand)
self.add_route(r'/normalize/<aoid:re:[\w]{8}(-[\w]{4}){3}-[\w]{12}>', self.__normalize)

View File

@ -15,3 +15,4 @@ config.unrar_config.path = "C:\\Program Files\\WinRAR\\unrar.exe"
config.folders.temp = "E:\\!TEMP"
config.basic.logging = True
config.basic.logfile = "pyphias.log"

View File

@ -9,9 +9,9 @@ except ImportError:
assert "No config"
# Define main app
phias_app = phias.App("pyphias.log")
phias_app = phias.App(config.basic.logfile)
# Define wsgi app
application = phias_app._app
application = phias_app.get_app()
# Run bottle WSGI server if no external
if __name__ == '__main__':