Skip to content

Commit

Permalink
better console output
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Büchele committed Dec 30, 2014
1 parent a0db8b8 commit 8dcdd9e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions bin/replayer
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import logging
import signal
import sys
import os.path
from datetime import datetime

import apachelog

Expand All @@ -23,6 +24,7 @@ from replayer.inspector import Inspector




# global variables
thread_list = []
killed = False
Expand All @@ -36,12 +38,13 @@ def signal_handler(signal, frame):


def print_infos(logfile):
logging.info('This is replayer, Version ' + replayer.__version__)
logging.info('This is replayer, Version %s', replayer.__version__)
logging.info('Copyright 2014 Andreas Buechele, https://github.com/buechele/replayer')
logging.info('replayer is released under the terms of the MIT license.')
logging.info('')
logging.info('Replaying ' + logfile + ' (be patient)...')
logging.info('')

now = datetime.now()
logging.info('[%s] Replaying %s (be patient)...', now.strftime('%d/%m/%Y %H:%M:%S'), logfile)


def print_results(config, inspector):
Expand Down Expand Up @@ -123,6 +126,10 @@ def main():
t.join()
inspector += t.get_inspector()

now = datetime.now()
logging.info('[%s] Done', now.strftime('%d/%m/%Y %H:%M:%S'))
logging.info('')

# print results
print_results(config, inspector)

Expand Down

0 comments on commit 8dcdd9e

Please sign in to comment.