XeFM provides comprehensive logging functionality that captures application output, error messages, and operational information in a dedicated log pane. The logging system helps you monitor XeFM’s operations, troubleshoot issues, and understand what the application is doing.
The log pane appears at the bottom of the XeFM interface and displays:
Messages are color-coded by type:
┌─────────────────────────────────────────────────────────────┐
│ │
│ Main XeFM Interface │
│ (File Browser) │
│ │
├─────────────────────────────────────────────────────────────┤
│ Log Messages: │
│ 14:23:45 [Main] INFO: XeFM started │
│ 14:23:46 [FileOp] INFO: Copying file.txt to backup/ │
│ 14:23:47 [FileOp] INFO: Copy completed successfully │
│ 14:23:48 [STDOUT] Processing complete │
└─────────────────────────────────────────────────────────────┘
Four actions scroll the log without taking focus off the file list — press F1
for the keys they are on:
scroll_log_up / scroll_log_down: one line at a timescroll_log_page_up / scroll_log_page_down: a page at a time, so
scroll_log_page_down from the middle of the history walks back to the newest
messagesWatch file operations in real-time:
14:23:45 [FileOp] INFO: Copying file1.txt to backup/
14:23:46 [FileOp] INFO: Copy completed successfully
14:23:46 [FileOp] INFO: Copying file2.txt to backup/
14:23:47 [FileOp] INFO: Copy completed successfully
Identify and understand errors:
14:23:45 [FileOp] INFO: Copying protected.txt to backup/
14:23:46 [FileOp] ERROR: Permission denied
See output from external programs:
14:23:45 [Main] INFO: Running external script
14:23:46 [STDOUT] Processing file 1 of 10
14:23:47 [STDOUT] Processing file 2 of 10
14:23:48 [STDOUT] Processing complete
Monitor long-running operations:
14:23:45 [Archive] INFO: Extracting archive.zip
14:23:46 [Archive] INFO: Extracted 100 of 500 files
14:23:47 [Archive] INFO: Extracted 200 of 500 files
14:23:48 [Archive] INFO: Extracted 300 of 500 files
14:23:49 [Archive] INFO: Extraction completed
The log pane size is configurable:
XeFM retains a configurable number of log messages:
Control the verbosity of logging:
Set log level in configuration:
# In config file
LOG_LEVEL = "INFO" # or "WARNING", "DEBUG", "ERROR"
The log pane’s contents go to the system clipboard two ways, in the desktop app and in the terminal alike — handy for pasting into a bug report, a chat message or a note.
Drag across the log with the mouse to highlight lines (double-click selects a
word, triple-click a line, and dragging past the top or bottom edge keeps
selecting), then run copy_log_selection — the macOS desktop app answers the
platform’s own copy chord for it as well. The highlight clears once the text is
on the clipboard.
The chord copies whatever the log has highlighted, whichever pane you were last clicking in — so selecting in the log and then going back to the file list does not lose the copy. With nothing highlighted it does nothing at all.
Edit ▸ Copy Log Selection does the same thing from the menu, and is grayed out until something is selected.
Edit ▸ Copy All Logs copies every line the pane still holds — the ones from startup, the ones scrolled out of sight, everything up to the buffer limit (2000 lines) — and reports the count in the log itself. This is the one to reach for when someone asks you to paste your log.
It ships without a key of its own. To give it one, bind copy_log_all in
~/.xefm/config.py:
KEY_BINDINGS['copy_log_all'] = ['Ctrl-G']
copy_log_selection is bound the same way if you would rather it answered some
other chord.
Lines arrive exactly as the pane shows them: logger messages carry their timestamp (HH:MM:SS), logger name and level, while the app’s own status lines are copied as plain text, just as they are drawn.
14:23:45 [Main ] INFO: Application started
14:23:46 [FileOp] INFO: Loaded directory: /home/user/documents
Copied 3 names to clipboard
14:23:47 [Main ] WARNING: Configuration file not found, using defaults
A selection copies the lines as they are laid out on screen, so a long line that wraps arrives split at the wrap points. Copy All Logs copies whole lines, unwrapped.
scroll_log_upscroll_log_page_upscroll_log_page_downProblem: Log pane doesn’t appear.
Solution: Check configuration:
LOG_PANE_ENABLED = True in configProblem: New messages scroll by too quickly.
Solution:
scroll_log_up to scroll up and reviewscroll_log_page_upProblem: Log pane fills with too many messages.
Solution:
MAX_LOG_MESSAGES in config (default: 1000)All messages include timestamps:
14:23:45 [FileOp] INFO: Operation started
14:23:46 [FileOp] INFO: Operation completed
Format: HH:MM:SS (24-hour format)
Messages show their source:
Multi-line output is preserved:
14:23:45 [STDOUT] Processing file: example.txt
14:23:45 [STDOUT] Size: 1024 bytes
14:23:45 [STDOUT] Modified: 2024-01-15
Messages are color-coded for easy identification:
XeFM’s logging feature provides comprehensive visibility into application operations, helping you monitor activity, troubleshoot issues, and understand what the application is doing. The color-coded, scrollable log pane makes it easy to track operations and identify problems quickly.
For developer documentation, see doc/dev/LOGGING_SYSTEM.md.