User sees “INFO” messages in the GUI log widget, but NOT “ERROR”, “WARNING”, or other log levels.
I traced through the entire logging system and found the filtering logic:
src/utils/logging.py (line 330-338):
def should_emit_gui(self, category: str, level: int) -> bool:
if level < self._gui_level:
return False # Block message
# ... category checks ...
level_gui = INFO:
According to the code, ERROR and WARNING should ALWAYS show when INFO shows!
This is because:
So if INFO appears, ERROR and WARNING must also pass the filter.
Maybe ERROR/WARNING messages aren’t being logged with level="error" or level="warning":
# Wrong (defaults to INFO)
log("Something failed")
# Correct (explicit ERROR level)
log("Something failed", level="error")
Each category can be disabled independently. If ERROR messages are in a disabled category:
[LOGGING]
cats_gui_network = false # Blocks ALL network messages, even ERROR
Code paths that would generate ERROR/WARNING might not be executing.
The config file might have:
[LOGGING]
level_gui = ERROR # This would block INFO and WARNING!
But this contradicts the fact that INFO is showing…
python3 scripts/diagnose_log_filtering.py
This will show:
level_gui settingpython3 scripts/test_log_levels.py
This sends messages at all levels and you can see which appear in the GUI.
Check if ERROR messages are even being called:
grep -rn 'level="error"\|level="warning"' src/
If everything is working correctly:
diagnose_log_filtering.py should show:
GUI Log Level: INFOtest_log_levels.py should display:
Check the diagnostic output for:
level_gui setting (should be INFO or DEBUG)Search the codebase:
# Find all ERROR log calls
grep -rn 'log.*level.*error\|log.*"error"' src/
# Find all WARNING log calls
grep -rn 'log.*level.*warning\|log.*"warning"' src/
If no results, then ERROR/WARNING simply aren’t being logged anywhere!
Based on the code analysis, I suspect one of these:
log(message) without level="error"If you want to test ERROR messages immediately, add this to any Python file:
from src.utils.logger import log
log("This is an ERROR test", level="error", category="general")
log("This is a WARNING test", level="warning", category="general")
log("This is an INFO test", level="info", category="general")
All three should appear in the GUI (assuming general category is enabled).
~/.bbdrop/bbdrop.ini - Check [LOGGING] sectionsrc/utils/logger.py - Main logging function (line 198-370)src/utils/logging.py - AppLogger class with filters (line 330-338)src/gui/main_window.py - GUI log display (line 5214-5263)The logging system should work correctly. If ERROR/WARNING don’t show but INFO does, it’s likely:
Run the diagnostic scripts to find out which!