Skip to main content

Application Logs

View, search, and export application logs to troubleshoot issues and monitor Xermius activity.

What Are Application Logs?

Simple Explanation: Application logs record everything that happens in Xermius—connections, errors, warnings, and system events. Think of it as a detailed diary of your application activity.

Why logs matter:

Problem: "Connection failed, why?"
Solution: Check logs → See exact error message
Result: Know what went wrong

Problem: "App crashed yesterday"
Solution: Check logs → See what happened before crash
Result: Identify cause

Problem: "Something's slow"
Solution: Check logs → See performance warnings
Result: Find bottleneck

Log Levels

ERROR (Red) 🔴

Critical issues requiring attention:

Examples:
- SSH connection failed
- Authentication error
- Database error
- File system error
- Network timeout

Indicators:

  • Red badge
  • High priority
  • Needs investigation

WARNING (Yellow) 🟡

Important but not critical:

Examples:
- Slow connection
- Deprecated feature used
- Configuration issue
- Resource limits approaching
- Non-critical failures

Indicators:

  • Yellow badge
  • Medium priority
  • Should investigate

INFO (Blue) 🔵

Normal operations:

Examples:
- Connection established
- Host added
- File transferred
- Sync completed
- Settings changed

Indicators:

  • Blue badge
  • Low priority
  • Informational only

DEBUG (Gray) ⚪

Developer information:

Examples:
- Function calls
- Variable values
- Internal operations
- Performance metrics
- Detailed traces

Indicators:

  • Gray badge
  • Very low priority
  • Only in development mode

Accessing Logs

Location:

Main Menu → Logs
or
Settings → Troubleshooting → View Logs
or
Keyboard: Ctrl+Shift+L (Cmd+Shift+L on Mac)

Logs Interface

┌──────────────────────────────────────────────┐
│ Application Logs [⋯] │
├──────────────────────────────────────────────┤
│ [Search logs...] [Level ▼] [Date ▼]│
├──────────────────────────────────────────────┤
│ 📊 Stats: 1,247 total | 3 errors | 15 warns │
├──────────────────────────────────────────────┤
│ │
│ ERROR 10:45:32 SSH Connection Failed │
│ SSH │
│ Failed to connect to production.example.com │
│ Error: ECONNREFUSED │
│ │
│ WARN 10:44:18 Slow Connection Detected │
│ Network │
│ Connection to staging took 5.2s │
│ │
│ INFO 10:43:05 Host Added Successfully │
│ Database │
│ New host: dev-server-01 │
│ │
│ DEBUG 10:42:50 SSH Client Initialized │
│ System │
│ Client ready for connections │
└──────────────────────────────────────────────┘

Searching Logs

Search box:

[Search logs...                         🔍]

Type to search:
- Error messages
- Host names
- IP addresses
- User names
- Any text

Examples:

Search: "production"
→ Shows all logs mentioning "production"

Search: "192.168.1.100"
→ Shows logs for that IP

Search: "failed"
→ Shows all failure messages

Search: "timeout"
→ Shows timeout errors

Filter by Level

Level dropdown:

[Level ▼]
○ All
○ Error only
○ Warning only
○ Info only
○ Debug only

Use cases:

Troubleshooting?
→ Select "Error only"

Monitoring?
→ Select "Warning only"

Review activity?
→ Select "Info only"

Development?
→ Select "Debug only"

Filter by Date

Date dropdown:

[Date ▼]
○ All time
○ Today
○ Last 7 days
○ Last 30 days
○ Custom range...

Examples:

Find recent errors:
Date: Today
Level: Error

Review last week:
Date: Last 7 days
Level: All

Specific timeframe:
Date: Custom range
From: Jan 15, 2024
To: Jan 17, 2024

Filter by Context

Context filter:

[Context ▼]
○ All
○ SSH
○ Auth
○ Security
○ System
○ Database
○ Sync
○ Network
○ Cloudflare
○ PortForwarding
○ Keychain
○ KnownHosts

Purpose:

SSH issues?
→ Context: SSH

Sync problems?
→ Context: Sync

Security audit?
→ Context: Security, Auth

Combined Filters

Powerful combinations:

Example 1: Recent SSH Errors
Level: Error
Context: SSH
Date: Today
→ Shows today's SSH failures

Example 2: Security Warnings
Level: Warning
Context: Security, Auth
Date: Last 7 days
→ Shows security concerns

Example 3: Sync Activity
Level: Info
Context: Sync
Date: Last 30 days
→ Shows sync operations

Log Details

Click any log to see full details:

┌──────────────────────────────────────────────┐
│ Log Details [✕] │
├──────────────────────────────────────────────┤
│ Level: ERROR │
│ Time: 2024-01-17 10:45:32 │
│ Context: SSH │
│ Message: Failed to connect │
│ │
│ ─── Full Message ─────────────────────────── │
│ SSH connection failed to production.server │
│ Host: production.example.com │
│ Port: 22 │
│ User: deploy │
│ │
│ ─── Error Details ───────────────────────── │
│ Code: ECONNREFUSED │
│ Errno: -61 │
│ Syscall: connect │
│ Stack trace: [View Full] │
│ │
│ ─── Metadata ─────────────────────────────── │
│ Host ID: host_abc123 │
│ Attempt: 1 of 3 │
│ Timeout: 30s │
│ Duration: 2.5s │
│ │
│ [Copy] [Export] [Close] │
└──────────────────────────────────────────────┘

Exporting Logs

Export Options

Export menu:

Menu (⋯) → Export
→ Export All Logs
→ Export Filtered Logs
→ Export Current View

Export Formats

JSON Format:

{
"logs": [
{
"id": "log_123",
"level": "error",
"message": "SSH connection failed",
"context": "SSH",
"timestamp": "2024-01-17T10:45:32.000Z",
"metadata": {
"hostId": "host_abc",
"host": "production.example.com",
"error": "ECONNREFUSED"
}
}
],
"exportedAt": "2024-01-17T11:00:00.000Z",
"totalLogs": 1247
}

CSV Format:

Time,Level,Context,Message,Metadata
2024-01-17 10:45:32,ERROR,SSH,"SSH connection failed","{""host"":""production.example.com""}"
2024-01-17 10:44:18,WARN,Network,"Slow connection","{""duration"":5200}"

TXT Format:

===== Xermius Application Logs =====
Exported: 2024-01-17 11:00:00
Total: 1,247 logs

[2024-01-17 10:45:32] ERROR [SSH]
SSH connection failed to production.example.com
Host: production.example.com
Port: 22
Error: ECONNREFUSED

[2024-01-17 10:44:18] WARN [Network]
Slow connection detected
Duration: 5.2s

Export Workflow

1. Apply filters (optional):
Level: Error
Date: Last 7 days

2. Click Export button

3. Choose format:
JSON, CSV, or TXT

4. Select location:
Desktop/logs/xermius-logs-2024-01-17.json

5. Click Save

6. ✓ Logs exported!

Log Statistics

Stats panel shows:

┌────────────────────────────────────┐
│ Log Statistics │
├────────────────────────────────────┤
│ Total Logs: 1,247 │
│ │
│ By Level: │
│ ERROR: 3 (0.2%) │
│ WARNING: 15 (1.2%) │
│ INFO: 1,200 (96.2%) │
│ DEBUG: 29 (2.3%) │
│ │
│ By Context: │
│ SSH: 450 (36%) │
│ Database: 300 (24%) │
│ Network: 200 (16%) │
│ System: 150 (12%) │
│ Other: 147 (12%) │
│ │
│ Time Range: │
│ Oldest: 30 days ago │
│ Newest: Just now │
└────────────────────────────────────┘

Managing Logs

Auto-Cleanup

Settings → Logs:

Log Retention:
[✓] Automatically delete old logs

Keep logs for:
○ 7 days
● 30 days
○ 90 days
○ Forever

Delete logs older than: 30 days
Next cleanup: In 5 days

Manual Cleanup

Clear logs:

Menu (⋯) → Clear Logs
→ Clear Old Logs (>30 days)
→ Clear All Logs

Clear old logs:

┌────────────────────────────────────┐
│ Clear Old Logs │
├────────────────────────────────────┤
│ Delete logs older than: │
│ [30] days │
│ │
│ This will delete approximately: │
│ 450 logs (36%) │
│ │
│ ⚠️ This cannot be undone │
│ │
│ [Cancel] [Delete] │
└────────────────────────────────────┘

Common Log Messages

SSH Errors

ECONNREFUSED:

ERROR [SSH] Connection refused
Cause: SSH service not running
Fix: Start SSH on server

ETIMEDOUT:

ERROR [SSH] Connection timeout
Cause: Network/firewall issue
Fix: Check network, firewall

Authentication failed:

ERROR [Auth] Authentication failed
Cause: Wrong credentials
Fix: Verify username/password

Network Warnings

Slow connection:

WARN [Network] Slow connection (>3s)
Cause: Network latency
Action: Monitor network

Retrying connection:

WARN [SSH] Retrying connection (attempt 2/3)
Cause: Temporary network issue
Action: Wait for retry

System Info

App started:

INFO [System] Xermius started
Version: 2.1.0

Host added:

INFO [Database] Host added
Name: production-01

Sync completed:

INFO [Sync] Sync successful
Hosts: 25
Duration: 1.2s

Troubleshooting with Logs

Scenario 1: Connection Keeps Failing

Steps:

1. Open Logs
2. Filter:
Level: Error
Context: SSH
Date: Today

3. Look for:
- Error type (ECONNREFUSED, ETIMEDOUT)
- Host information
- Consistent failures

4. Find solution:
- ECONNREFUSED → Start SSH
- ETIMEDOUT → Check firewall
- Auth failed → Fix credentials

Scenario 2: App Crashed

Steps:

1. Restart Xermius
2. Open Logs immediately
3. Filter:
Date: Today
Level: Error

4. Look for:
- Last error before crash
- Stack traces
- Memory errors

5. Export logs:
- Send to support
- Include in bug report

Scenario 3: Performance Issues

Steps:

1. Open Logs
2. Filter:
Level: Warning
Context: Network, System
Date: Last 7 days

3. Look for:
- "Slow" messages
- Timeout warnings
- Resource warnings

4. Identify pattern:
- Specific hosts slow?
- All connections slow?
- Time-based issues?

Log Settings

Settings → Logs & Activity:

Application Logs:
[✓] Enable logging
[✓] Log to file

Log Level:
○ Error only
○ Warning and above
● Info and above (recommended)
○ All (including debug)

File Settings:
Log file location: ~/Library/Logs/Xermius/
Max file size: [10] MB
Max files: [5] files

[Open Log Folder] button

Tips & Best Practices

1. Regular Review

Daily:
- Check for errors
- Review warnings

Weekly:
- Export important logs
- Clear old logs if needed

Monthly:
- Review statistics
- Identify patterns

2. Export Before Clearing

Before clearing logs:
1. Export to file
2. Save somewhere safe
3. Then clear

Keep exports for:
- Bug reports
- Support tickets
- Audit purposes

3. Use Filters Effectively

Too many logs?
1. Start with Level: Error
2. Review and fix errors
3. Then Level: Warning
4. Address warnings
5. Info is for reference

4. Context is Key

When troubleshooting:
1. Know the area (SSH, Sync, etc.)
2. Filter by context
3. Focused search
4. Faster solution

5. Time-Based Investigation

Know when issue occurred?
1. Set date filter
2. Narrow timeframe
3. Find exact logs
4. Understand sequence

Next Steps