#333 Show netdisco-do target device in log message at start

This commit is contained in:
Oliver Gorwits
2017-08-01 10:26:38 +01:00
parent d2c50e9454
commit df764bfc98
2 changed files with 12 additions and 1 deletions

View File

@@ -1,5 +1,9 @@
2.036009 - 2017-07-31 2.036009 - 2017-07-31
[ENHANCEMENTS]
* #333 Show netdisco-do target device in log message at start
[BUG FIXES] [BUG FIXES]
* #334 DB schema is not upgraded past v40 * #334 DB schema is not upgraded past v40

View File

@@ -241,10 +241,17 @@ foreach my $host (@hostlist) {
subaction => $extra, subaction => $extra,
}); });
my $actiontext = (
($job->device ? ('['.$job->device->ip.']') : '') .
($job->action eq 'show' ? ('/'.$job->subaction) : '')
);
# do job # do job
my ($status, $log); my ($status, $log);
try { try {
info sprintf '%s: started at %s', $action, scalar localtime;
info sprintf '%s: %s started at %s',
$action, $actiontext, scalar localtime;
($status, $log) = $worker->$action($job); ($status, $log) = $worker->$action($job);
} }
catch { catch {