Unified Logger - Attempt #1#777
Conversation
| self.setReadOnly(True) | ||
| self.setStyleSheet("background-color: black; color: white; font-family: Consolas, monospace; font-size: 12px;") | ||
|
|
||
| def append_ansi_text(self, text: str): |
There was a problem hiding this comment.
QPlainTextEdit does not support appendHtml(), so this will raise at the first log message. Either subclass QTextEdit here or append plain text after stripping the ANSI codes.
| @@ -245,10 +163,10 @@ def _setup_ui(self): | |||
| self.tabs.addTab(self.console_output, "Full Logs") | |||
| self._setup_tab_corner_widgets() | |||
|
|
|||
There was a problem hiding this comment.
The startup banner/direct emit was removed, so the console tab now misses the initial banner and any logs emitted before _setup_ui() finishes. If that output still matters, replay it into the new handler or keep the direct emit.
There was a problem hiding this comment.
My hope is that all the emits can be dropped directly. If we're writing straight to the logger I don't get why we'd need them.
There was a problem hiding this comment.
It's honestly possible I need some things explained to me and maybe they are required
cjshrader
left a comment
There was a problem hiding this comment.
A few small comments but overall this change looks fine. I do need to do some testing. I think you need to make sure you test the console only version and it still works fine.
| ) | ||
| check_chest_tabs: list[int] = Field( | ||
| default=[0, 1], | ||
| default=[0, 1, 2, 3, 4, 5, 6], |
There was a problem hiding this comment.
| default=[0, 1, 2, 3, 4, 5, 6], | |
| default=[0, 1], |
| @@ -245,10 +163,10 @@ def _setup_ui(self): | |||
| self.tabs.addTab(self.console_output, "Full Logs") | |||
| self._setup_tab_corner_widgets() | |||
|
|
|||
There was a problem hiding this comment.
My hope is that all the emits can be dropped directly. If we're writing straight to the logger I don't get why we'd need them.
| @@ -245,10 +163,10 @@ def _setup_ui(self): | |||
| self.tabs.addTab(self.console_output, "Full Logs") | |||
| self._setup_tab_corner_widgets() | |||
|
|
|||
There was a problem hiding this comment.
It's honestly possible I need some things explained to me and maybe they are required
| print(table) | ||
| print() # blank line, just like OG D4LF | ||
| # --- END HEADER --- | ||
| for line in str(table).split("\n"): |
There was a problem hiding this comment.
Am I missing something here? It seems to me like all of the rows have been removed. People play in console-only mode which doesn't have the GUI so at a minimum they'll need this information.
We eliminated the dual-handler approach where the "Dashboard" and "Full Logs" were treated as separate entities with different formatting rules.
We introduced two new boolean fields to the AdvancedOptionsModel: log_timestamp and technical_log_info.
A critical change was made to ensure that "cleaning up" the logs for the user didn't destroy the ability to debug issues later.
We introduced two new boolean fields to the AdvancedOptionsModel: log_timestamp and technical_log_info.
A critical change was made to ensure that "cleaning up" the logs for the user didn't destroy the ability to debug issues later.
Banner Normalization: We removed the hardcoded print and manual string manipulation for the startup banner. The application now uses LOGGER.info to emit the version and hotkey information, allowing the unified handler to capture it naturally without "workaround" logic in [unified_window.py].