Add log filename to config
This commit is contained in:
parent
255f895993
commit
356bcf74c4
@ -2,6 +2,7 @@
|
||||
|
||||
class basic:
|
||||
logging = False
|
||||
logfile = ""
|
||||
|
||||
|
||||
class sphinx_conf:
|
||||
|
@ -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)
|
||||
|
@ -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"
|
||||
|
@ -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__':
|
||||
|
Loading…
x
Reference in New Issue
Block a user