← XeFM crftwr/xefm on GitHub · craftware

Logging Feature

Overview

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.

Features

Log Pane Display

The log pane appears at the bottom of the XeFM interface and displays:

Message Types

Messages are color-coded by type:

Visual Layout

┌─────────────────────────────────────────────────────────────┐
│                                                             │
│              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                      │
└─────────────────────────────────────────────────────────────┘

Scrolling Through Logs

Use keyboard shortcuts to navigate through log history:

Auto-Scroll Behavior

Common Use Cases

Monitoring File Operations

Watch 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

Troubleshooting Errors

Identify and understand errors:

14:23:45 [FileOp] INFO: Copying protected.txt to backup/
14:23:46 [FileOp] ERROR: Permission denied

Viewing Program Output

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

Tracking Progress

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

Configuration

Log Pane Size

The log pane size is configurable:

Message Retention

XeFM retains a configurable number of log messages:

Log Levels

Control the verbosity of logging:

Set log level in configuration:

# In config file
LOG_LEVEL = "INFO"  # or "WARNING", "DEBUG", "ERROR"

Copy Log to Clipboard

When running XeFM in desktop mode, you can copy the log pane contents to the system clipboard — handy for sharing log information with others or saving it for later reference. This feature is not available in terminal mode.

Accessing the Feature

The log clipboard copy commands live in the Edit menu:

  1. Open XeFM in desktop mode.
  2. Click the Edit menu in the menu bar.
  3. Choose one of the clipboard copy options:
    • Copy Visible Logs to Clipboard — copies only the log lines currently visible in the log pane.
    • Copy All Logs to Clipboard — copies all log messages, including those scrolled out of view.

Copy Visible Logs

Copies only the log lines currently visible in the log pane. The copied content reflects your current scroll position, the number of lines that fit in the visible area, and the exact formatting shown on screen.

Use this when you want to share a specific section of the logs, you’ve scrolled to a particular area of interest, or you only need recent messages.

Copy All Logs

Copies all log messages from the current session — everything from startup, messages that have scrolled out of view, and the complete log history (up to the configured maximum).

Use this when you need the full log history, you’re troubleshooting an issue and need complete context, or you want to save all logs for later analysis.

Copied Format

Copied logs preserve the same format shown in the log pane — timestamp (HH:MM:SS), logger name, log level, and message content:

14:23:45 [Main  ] INFO: Application started
14:23:46 [FileOp] INFO: Loaded directory: /home/user/documents
14:23:47 [Main  ] WARNING: Configuration file not found, using defaults

Tips for Copying

There are currently no keyboard shortcuts for these commands; use the Edit menu.

Tips and Tricks

Finding Recent Errors

  1. Press Shift+End to jump to bottom
  2. Press Shift+↑ to scroll up
  3. Look for red error messages

Reviewing Operation History

  1. Press Shift+Home to jump to top
  2. Press Shift+Page Down to scroll through history
  3. Review messages chronologically

Monitoring Long Operations

  1. Keep log pane visible during operations
  2. Watch for progress messages
  3. Check for errors or warnings
  4. Verify completion messages

Debugging Issues

  1. Enable DEBUG log level for detailed information
  2. Reproduce the issue
  3. Review log messages for clues
  4. Look for error messages and warnings

Troubleshooting

Log Pane Not Visible

Problem: Log pane doesn’t appear.

Solution: Check configuration:

Messages Scrolling Too Fast

Problem: New messages scroll by too quickly.

Solution:

Too Many Messages

Problem: Log pane fills with too many messages.

Solution:

Benefits

For Users

For Troubleshooting

For Developers

Advanced Features

Message Timestamps

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)

Source Identification

Messages show their source:

Multi-line Messages

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

Color Coding

Messages are color-coded for easy identification:

Best Practices

Regular Monitoring

Log Level Selection

Message Review

Conclusion

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.