put back url info started at the end of initialisations stable
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Tue, 03 Nov 2009 11:19:10 +0100
branchstable
changeset 3791 62d6ab877694
parent 3790 34fdb8fb49d1
child 3792 8d0b5de8002b
put back url info started at the end of initialisations
etwist/server.py
--- a/etwist/server.py	Mon Nov 02 16:37:19 2009 +0100
+++ b/etwist/server.py	Tue Nov 03 11:19:10 2009 +0100
@@ -382,14 +382,13 @@
     port = config['port'] or 8080
     reactor.listenTCP(port, channel.HTTPFactory(website))
     logger = getLogger('cubicweb.twisted')
-    logger.info('instance started on %s', root_resource.base_url)
     if not debug:
         print 'instance starting in the background'
         if daemonize():
             return # child process
         if config['pid-file']:
             # ensure the directory where the pid-file should be set exists (for
-            # instance /var/run/cubicweb may be deleted on computer restart) 
+            # instance /var/run/cubicweb may be deleted on computer restart)
             piddir = os.path.dirname(config['pid-file'])
             if not os.path.exists(piddir):
                 os.makedirs(piddir)
@@ -403,6 +402,7 @@
             uid = getpwnam(config['uid']).pw_uid
         os.setuid(uid)
     root_resource.start_service()
+    logger.info('instance started on %s', root_resource.base_url)
     if config['profile']:
         prof = hotshot.Profile(config['profile'])
         prof.runcall(reactor.run)