~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to serve-branches

  • Committer: Martin Albisetti
  • Date: 2008-11-20 16:55:47 UTC
  • Revision ID: argentina@gmail.com-20081120165547-q0pwoo1x1rfhqkpn
Fixed setup to install YUI

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
    parser.add_option("--trunk-dir", metavar="DIR",
45
45
                      help="The directory that contains the trunk branches.")
46
46
    parser.add_option("--port", dest="user_port",
47
 
                      help="Port Loggerhead should listen on (defaults to 8080).")
 
47
                      help=("Port Loggerhead should listen on "
 
48
                            "(defaults to 8080)."))
48
49
    parser.add_option("--host", dest="user_host",
49
50
                      help="Host Loggerhead should listen on.")
50
51
    parser.add_option("--prefix", dest="user_prefix",
51
52
                      help="Specify host prefix.")
 
53
    parser.add_option("--profile", action="store_true", dest="profile",
 
54
                      help="Generate callgrind profile data to "
 
55
                        "%d-stats.callgrind on each request.")
52
56
    parser.add_option("--reload", action="store_true", dest="reload",
53
57
                      help="Restarts the application when changing python"
54
58
                           " files. Only used for development purposes.")
115
119
    app = ErrorHandlerApp(app)
116
120
    app = HTTPExceptionHandler(app)
117
121
    app = TransLogger(app, logger=logger)
 
122
    if options.profile:
 
123
        from loggerhead.middleware.profile import LSProfMiddleware
 
124
        app = LSProfMiddleware(app)
118
125
 
119
126
    if not options.user_prefix:
120
127
        prefix = '/'