Skip to content

intelmqctl log returns error for newly configured bots #2090

@ghost

Description

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions