Skip to content

Commit

Permalink
automator log command shows settings if no logs are found. KC-724
Browse files Browse the repository at this point in the history
  • Loading branch information
sk-keeper committed Jan 4, 2024
1 parent 40409fa commit 07ca6c4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion keepercommander/commands/automator.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,13 @@ def execute(self, params, **kwargs): # type: (KeeperParams, **any) -> any
rq.automatorId = automator.automatorId
rs = api.communicate_rest(params, rq, endpoint, rs_type=automator_proto.AdminResponse)
if rs.automatorInfo:
self.dump_automator(rs.automatorInfo[0])
endpoint = rs.automatorInfo[0]
if endpoint.logEntries:
logging.info('\n{0:>32s}\n'.format('Automator Log'))
for log in endpoint.logEntries:
logging.info('<{0}> {1} - {2}'.format(log.messageLevel, log.serverTime, log.message))
else:
logging.info('\nNo log entries found.')


class AutomatorCertificateCommand(Command):
Expand Down

0 comments on commit 07ca6c4

Please sign in to comment.