ajout logging dans pyramidsvc.py
This commit is contained in:
@@ -23,21 +23,24 @@ class PyWebService(win32serviceutil.ServiceFramework):
|
|||||||
_svc_description_ = SERVICE_DESCRIPTION
|
_svc_description_ = SERVICE_DESCRIPTION
|
||||||
|
|
||||||
def SvcDoRun(self):
|
def SvcDoRun(self):
|
||||||
from cherrypy import wsgiserver
|
from cherrypy import wsgiserver
|
||||||
from pyramid.paster import get_app
|
from pyramid.paster import get_app
|
||||||
import os, sys
|
from pyramid.paster import setup_logging
|
||||||
|
import os, sys
|
||||||
|
|
||||||
path = os.path.dirname(os.path.abspath(__file__))
|
path = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
|
||||||
os.chdir(path)
|
os.chdir(path)
|
||||||
|
|
||||||
app = get_app(CONFIG_FILE)
|
app = get_app(CONFIG_FILE)
|
||||||
|
setup_logging(CONFIG_FILE)
|
||||||
|
|
||||||
self.server = wsgiserver.CherryPyWSGIServer(
|
|
||||||
('0.0.0.0', PORT_TO_BIND), app,
|
|
||||||
server_name=SERVER_NAME)
|
|
||||||
|
|
||||||
self.server.start()
|
self.server = wsgiserver.CherryPyWSGIServer(
|
||||||
|
('0.0.0.0', PORT_TO_BIND), app,
|
||||||
|
server_name=SERVER_NAME)
|
||||||
|
|
||||||
|
self.server.start()
|
||||||
|
|
||||||
|
|
||||||
def SvcStop(self):
|
def SvcStop(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user