Skip to content
Back to skills

Log Viewer

ASecurity

View and analyze WaveCap-SDR server logs, debug output, and error messages. Use when troubleshooting server issues, debugging API errors, monitoring SDR device status, or investigating capture/channel problems.

  • 666 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added February 9, 2026
developmentpythonbashdebuggingapibackend

Works with

  • terminal
  • api

Security analysis

A96/100
  • mediumUses curl or wget to download content

Pro shows the line behind each finding and how to fix it

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill log-viewer --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Log Viewer?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Log Viewer
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-log-viewer/badge)](https://www.skillsdirectory.com/skills/majiayu000-log-viewer)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: log-viewer
description: View and analyze WaveCap-SDR server logs, debug output, and error messages. Use when troubleshooting server issues, debugging API errors, monitoring SDR device status, or investigating capture/channel problems.
---

# Log Viewer for WaveCap-SDR

This skill provides tools to view, search, and analyze logs from the WaveCap-SDR server including API errors, SDR device messages, and debug output.

## When to Use This Skill

Use this skill when:
- Troubleshooting API errors (500, 4xx responses)
- Investigating SDR device connection issues
- Debugging capture or channel problems
- Monitoring server health and status
- Reviewing recent API requests
- Checking for SoapySDR driver messages

## Log Sources

| Source | Description | Location |
|--------|-------------|----------|
| Server stdout | API requests, startup messages | Terminal/console |
| Server stderr | Errors, warnings, SoapySDR | Terminal/console |
| Debug log | Detailed error tracebacks | `/tmp/wavecapsdr_error.log` |
| SoapySDR | SDR driver messages | Embedded in stderr |

## Usage Instructions

### Step 1: View Recent Error Logs

Check the debug error log for recent exceptions:

```bash
cat /tmp/wavecapsdr_error.log 2>/dev/null || echo "No error log found"
```

Or use the helper script:

```bash
PYTHONPATH=backend backend/.venv/bin/python .claude/skills/log-viewer/view_logs.py --errors
```

### Step 2: Get Server Status

Check if the server is running and get process info:

```bash
PYTHONPATH=backend backend/.venv/bin/python .claude/skills/log-viewer/view_logs.py --status
```

### Step 3: View API Request History

Get recent API requests from server logs (if available):

```bash
PYTHONPATH=backend backend/.venv/bin/python .claude/skills/log-viewer/view_logs.py --requests
```

### Step 4: Check SDR Device Logs

View SoapySDR-related messages:

```bash
PYTHONPATH=backend backend/.venv/bin/python .claude/skills/log-viewer/view_logs.py --sdr
```

### Step 5: Test API Health

Verify API is responding and check health endpoint:

```bash
curl -s http://127.0.0.1:8087/api/v1/health | jq
```

## Helper Script Reference

```bash
# View all available log info
python view_logs.py --all

# View only errors
python view_logs.py --errors

# View server status
python view_logs.py --status

# View recent API requests
python view_logs.py --requests

# View SDR device logs
python view_logs.py --sdr

# Specify custom port
python view_logs.py --port 8087 --all

# Filter by time (last N minutes)
python view_logs.py --errors --minutes 5
```

## Common Log Patterns

### Successful API Request
```
INFO:     127.0.0.1:12345 - "GET /api/v1/captures HTTP/1.1" 200 OK
```

### Failed API Request
```
INFO:     127.0.0.1:12345 - "PATCH /api/v1/captures/c1 HTTP/1.1" 500 Internal Server Error
```

### SDR Device Message
```
[SOAPY] Using stream format: CF32
[DEBUG] Device RTLSDR: Available antennas: ('RX',)
```

### Error Traceback (in /tmp/wavecapsdr_error.log)
```
--- 2025-11-22 12:34:56.789 ---
[ERROR] update_capture failed: Device timeout
Traceback (most recent call last):
  ...
```

## API Endpoints for Log Analysis

### GET /api/v1/health
Returns server health status.

```json
{
  "status": "healthy",
  "captures": 2,
  "channels": 2,
  "devices": 3
}
```

### GET /api/v1/captures
Returns all captures with their current state and any error messages.

```json
[
  {
    "id": "c1",
    "state": "running",
    "errorMessage": null
  }
]
```

### GET /api/v1/channels/{chan_id}/metrics/extended
Returns detailed channel metrics including stream health.

## Troubleshooting Common Issues

### Issue: API Returns 500 Internal Server Error
**Steps**:
1. Check `/tmp/wavecapsdr_error.log` for traceback
2. Look for device-related errors in the log
3. Verify SDR device is connected: `SoapySDRUtil --find`
4. Check server stderr for SoapySDR errors

### Issue: Capture Stuck in "starting" State
**Steps**:
1. Check for SDR driver errors in logs
2. Verify device isn't in use by another process
3. Look for timeout messages
4. Try restarting the capture

### Issue: No Audio / Channel Not Working
**Steps**:
1. Check channel state via API
2. Look for demodulator errors in logs
3. Verify capture is running
4. Check signal metrics (RSSI, SNR)

## Files in This Skill

- `SKILL.md`: This file - instructions for using the skill
- `view_logs.py`: Helper script for viewing and analyzing logs

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.