~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to scripts/start-loggerhead.py

  • Committer: Andrew Bennetts
  • Date: 2010-07-15 09:21:46 UTC
  • mto: (11685.2.1 spiv-loggerhead)
  • mto: This revision was merged to the branch mainline in revision 11706.
  • Revision ID: andrew@bemusement.org-20100715092146-9be5eg3ncdmn41ck
Remove cruft, tweak log messages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
139
139
        log.info("Starting to process %s", url)
140
140
        start_time = time.time()
141
141
        def request_done_ok():
142
 
            log.info("Processed %s ok [%0.3f seconds]", url, time.time() -
 
142
            log.info("Processed ok %s [%0.3f seconds]", url, time.time() -
143
143
                    start_time)
144
144
        def request_done_err(exc_info):
145
 
            log.info("Processed %s err [%0.3f seconds]: %s", url, time.time() -
 
145
            log.info("Processed err %s [%0.3f seconds]: %s", url, time.time() -
146
146
                    start_time, traceback.format_exception_only(*exc_info[:2]))
147
147
        return catch_errors(app, environ, start_response, request_done_err,
148
148
                request_done_ok)
149
 
        return app(environ, start_response)
150
149
    return wrapped
151
150
app = log_request_start_and_stop(app)
152
151
app = PrefixMiddleware(app)