| 593 | self._log_events_printer.toggle_formatting() |
| 594 | |
| 595 | def get_instructions(self): |
| 596 | if self._log_events_printer.output_format == OutputFormat.JSON: |
| 597 | instructions = self.INSTRUCTIONS.format( |
| 598 | colorama.Fore.GREEN |
| 599 | + OutputFormat.JSON.value |
| 600 | + colorama.Style.RESET_ALL, |
| 601 | OutputFormat.PLAIN_TEXT.value, |
| 602 | ) |
| 603 | else: |
| 604 | instructions = self.INSTRUCTIONS.format( |
| 605 | OutputFormat.JSON.value, |
| 606 | colorama.Fore.GREEN |
| 607 | + OutputFormat.PLAIN_TEXT.value |
| 608 | + colorama.Style.RESET_ALL, |
| 609 | ) |
| 610 | |
| 611 | if self._is_scroll_active: |
| 612 | instructions += " q: Scroll to latest" |
| 613 | |
| 614 | return ANSI(instructions) |
| 615 | |
| 616 | def handle_scrolling(self, is_scroll_active): |
| 617 | self._is_scroll_active = is_scroll_active |