Permalink
Browse files

Save over 50% of logfile 'bloat' by not repeating all args on success…

…/failure

The data will be right above it just before we run the job.
  • Loading branch information...
lamby committed Mar 8, 2014
1 parent 078bcbf commit df216bdc25ef29da821f577a517ccdca61448cf4
Showing with 2 additions and 4 deletions.
  1. +2 −4 django_lightweight_queue/middleware/logging.py
@@ -10,15 +10,13 @@ def process_job(self, job):
log.info("Running job %s", job)
def process_result(self, job, result, duration):
- log.info("Finished job %s => %r (Time taken: %.2fs)",
- job,
+ log.info("Finished job => %r (Time taken: %.2fs)",
result,
duration,
)
def process_exception(self, job, duration, *exc_info):
- log.error("Exception when processing %r (duration: %.2fs): %s",
- job,
+ log.error("Exception when processing job (duration: %.2fs): %s",
duration,
''.join(traceback.format_exception(*exc_info)),
)

0 comments on commit df216bd

Please sign in to comment.