~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to start-loggerhead

  • Committer: John Arbash Meinel
  • Date: 2010-05-10 21:34:21 UTC
  • mfrom: (418.1.1 plugin_tests)
  • Revision ID: john@arbash-meinel.com-20100510213421-333dpyhl54n1u28h
Allow running the loggerhead test suite using 'bzr selftest'

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
# along with this program; if not, write to the Free Software
14
14
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
15
15
 
16
 
"""A script for starting the loggerhead process."""
 
16
"""
 
17
WARNING! This script has been deprecated and will go away soon!
 
18
A script for starting the loggerhead process.
 
19
"""
17
20
 
18
21
 
19
22
import logging
20
 
import logging.handlers
21
23
from optparse import OptionParser
22
24
import os
23
25
import sys
32
34
 
33
35
from loggerhead import daemon
34
36
from loggerhead.apps.config import Root
35
 
from loggerhead.trace import make_handler, setup_logging
 
37
from loggerhead.trace import setup_logging
36
38
from loggerhead.apps.error import ErrorHandlerApp
37
39
 
38
40
 
39
41
def main():
 
42
    sys.stderr.write('\n\n')
 
43
    sys.stderr.write('WARNING!!! This script has been deprecated by '
 
44
                     'serve-branches, and will be removed in the next '
 
45
                     'release. Please migrate to serve-branches and report '
 
46
                     'any missing features.\n')
 
47
    sys.stderr.write('\n\n')
 
48
 
40
49
    home = os.path.realpath(os.path.dirname(__file__))
41
50
    default_pidfile = os.path.join(home, 'loggerhead.pid')
42
51
    default_configfile = os.path.join(home, 'loggerhead.conf')
93
102
    if not options.foreground:
94
103
        sys.stderr.write('\n')
95
104
        sys.stderr.write('Launching loggerhead into the background.\n')
96
 
        sys.stderr.write('PID file: %s\n' % options.pidfile)
 
105
        sys.stderr.write('PID file: %s\n' % (options.pidfile,))
97
106
        sys.stderr.write('\n')
98
107
 
99
108
        daemon.daemonize(options.pidfile, home)