-
Notifications
You must be signed in to change notification settings - Fork 311
Closed
Description
intelmq/intelmq/bin/intelmqctl.py
Lines 765 to 772 in a87f3ca
| def read_bot_log(self, bot_id, log_level, number_of_lines): | |
| if self._parameters.logging_handler == 'file': | |
| bot_log_path = os.path.join(self._parameters.logging_path, | |
| bot_id + '.log') | |
| if not os.path.isfile(bot_log_path): | |
| self._logger.error("Log path not found: %s", bot_log_path) | |
| return 2, [] | |
| elif self._parameters.logging_handler == 'syslog': |
For newly added bots, no log file exists. That's no error. Instead, we could return a fake log entry 'INFO - No log file exists (yet)' to prevent an empty response.