[win32 service] activate logging to the configured file as soon as possible stable
authorAlexandre Fayolle <alexandre.fayolle@logilab.fr>
Sat, 29 May 2010 09:52:31 +0000
branchstable
changeset 5600 a826996875e7
parent 5524 2f3d4ca6f7f8
child 5601 92cf309672ca
[win32 service] activate logging to the configured file as soon as possible since we don't always have access to the system events of the computer running CW it is important to get as much information as possible in the log file, especially startup failure messages.
etwist/service.py
--- a/etwist/service.py	Wed May 12 17:07:07 2010 +0200
+++ b/etwist/service.py	Sat May 29 09:52:31 2010 +0000
@@ -71,6 +71,8 @@
             _check_env(os.environ)
             # create the site
             config = cwcfg.config_for(self.instance)
+            config.init_log(force=True)
+            logger.info('starting cubicweb instance %s ', self.instance)
             root_resource = CubicWebRootResource(config, False)
             website = server.Site(root_resource)
             # serve it via standard HTTP on port set in the configuration