viewer.log

This module provides a graphical log viewer using PySide6. The LogViewer class is a QMainWindow-based widget that displays the log file written by Decologr in a styled QTextEdit widget. It automatically refreshes to show new log entries.

Classes:

  • LogViewer: A main window that displays the log file and refreshes automatically.

Features:

  • Dark theme with a modern red-accented styling.

  • Automatically reads and displays the log file written by Decologr.

  • Refreshes periodically to show new log entries.

  • Provides a “Clear Log” button to reset the log display.

  • Auto-scrolls to the bottom to show the latest entries.

Usage Example:

>>> viewer = LogViewer()
>>> viewer.show()

Classes

LogViewer

Module Contents

class viewer.log.LogViewer(midi_helper=None, parent=None)[source]

Bases: PySide6.QtWidgets.QMainWindow

log_file[source]
last_position = 0[source]
fast_refresh_mode = True[source]
log_text[source]
refresh_mode_button[source]
refresh_timer[source]
load_log_file()[source]

Load the entire log file into the text widget

refresh_log_file()[source]

Read new lines from the log file and append them

toggle_refresh_mode()[source]

Toggle between fast refresh (500ms) and slow refresh (30s)

clear_log()[source]

Clear the log display

closeEvent(event)[source]

Stop the refresh timer when window is closed