Add timestamp to log messages.

This commit is contained in:
Darko Poljak 2018-09-23 20:34:42 +02:00
commit 6acf6f64dc
4 changed files with 48 additions and 3 deletions

View file

@ -251,6 +251,11 @@ def get_parsers():
'line). If no host or host file is specified then, by '
'default, read hosts from stdin.'),
dest='hostfile', required=False)
parser['config_args'].add_argument(
'-P', '--timestamp',
help=('Timestamp log messages with the current local date and time '
'in the format: YYYYMMDDHHMMSS.us.'),
action='store_true', dest='timestamp')
parser['config_args'].add_argument(
'-p', '--parallel', nargs='?', metavar='HOST_MAX',
type=functools.partial(check_lower_bounded_int, lower_bound=1,