-
Notifications
You must be signed in to change notification settings - Fork 22
feat(notebooks): support logs PS-13712 #296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@BartoszCki ready for re-review |
| return table_string | ||
|
|
||
|
|
||
| class NotebookLogsCommand(LogsCommandMixin, BaseNotebookCommand): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again: Why is this class moved to the end of the file?
|
|
||
| def _make_table(self, logs, id): | ||
| table_title = "%s %s logs" % (self.ENTITY, id) | ||
| table_data = [("LINE", "MESSAGE")] | ||
| table = terminaltables.AsciiTable(table_data, title=table_title) | ||
|
|
||
| for log in logs: | ||
| table_data.append(self._format_row(log)) | ||
|
|
||
| return table.table | ||
|
|
||
| def _get_log_row_string(self, id, log): | ||
| log_msg = "{}\t{}".format(*self._format_row(log)) | ||
| return log_msg | ||
|
|
||
| @staticmethod | ||
| def _format_row(log_row): | ||
| return (style(fg="red", text=str(log_row.line)), | ||
| log_row.message) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this moved to the end of the class? You could have implemented those methods without moving them around.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doing changes this way makes it harder to read git file history
No description provided.