[Feature] Live log output when started from terminal #15

Closed
opened 2026-09-07 15:50:43 +00:00 by x3 · 0 comments
Owner

Feature: When x3-ssh is started from a terminal, log messages are printed to stderr in real-time for better error diagnosis.

Implementation:

  • main.cpp sets up GLib log handlers that write to both stderr and ~/.config/sshclient/x3-ssh.log
  • Terminal logging is enabled only when stderr is a TTY (not redirected)
  • Format: [HH:MM:SS] [LEVEL] message
  • Key operations in ssh_terminal.cpp and ssh_client.cpp now emit g_message/g_warning logs

Example output:

[14:30:01] [INFO] x3-ssh starting (PID 12345)
[14:30:01] [INFO] Terminal logging: enabled
[14:30:05] [INFO] Connecting to 192.168.1.100:22 as root ...
[14:30:06] [INFO] SSH connection established, starting IO thread

Status: Implemented in commit fe7050c

**Feature:** When `x3-ssh` is started from a terminal, log messages are printed to stderr in real-time for better error diagnosis. **Implementation:** - `main.cpp` sets up GLib log handlers that write to both stderr and `~/.config/sshclient/x3-ssh.log` - Terminal logging is enabled only when stderr is a TTY (not redirected) - Format: `[HH:MM:SS] [LEVEL] message` - Key operations in `ssh_terminal.cpp` and `ssh_client.cpp` now emit `g_message`/`g_warning` logs Example output: ``` [14:30:01] [INFO] x3-ssh starting (PID 12345) [14:30:01] [INFO] Terminal logging: enabled [14:30:05] [INFO] Connecting to 192.168.1.100:22 as root ... [14:30:06] [INFO] SSH connection established, starting IO thread ``` **Status:** Implemented in commit fe7050c
x3 closed this issue 2026-09-07 16:58:14 +00:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: x3/x3-ssh#15