malv logs

View logs from all running MALV apps in a unified stream. Useful for debugging during development.

Usage

malv logs

What It Does

Tails the shared log file (~/.malv/dev-logs.jsonl) that all MALV dev workers write to. Logs are:

Interactive Controls

While viewing logs:

Key Action
c Clear the log display
t Toggle line truncation
Ctrl+C Exit

Output

$ malv logs

[14:32:15] @my-org/notes create_note
           input: { title: "Shopping List", content: "Milk, eggs" }
           output: { noteId: "abc123", success: true }
           duration: 45ms

[14:32:18] @my-org/notes edit_note
           input: { noteId: "abc123", content: "Milk, eggs, bread" }
           output: { success: true }
           duration: 23ms

[14:32:20] @my-org/auth verify_token
           input: { token: "..." }
           output: { valid: true, accountId: "user-456" }
           duration: 12ms

Log File Location

Logs are written to ~/.malv/dev-logs.jsonl. Each line is a JSON object with:

{
  "timestamp": "2024-01-15T14:32:15.123Z",
  "app": "@my-org/notes",
  "tool": "create_note",
  "type": "execution",
  "input": { "title": "Shopping List" },
  "output": { "noteId": "abc123" },
  "duration": 45
}

Related Commands

malv logs-html

Generate styled HTML from logs and copy to clipboard for sharing:

malv logs-html

Output:

$ malv logs-html

✓ Read 245 log entries
✓ Parsed 245 log entries
✓ Generated HTML (18.5 KB)
✓ HTML copied to clipboard

Paste the HTML into an email, document, or issue tracker to share formatted logs.

Options:

Option What It Does
--infra, -i Generate HTML from infrastructure server logs instead

malv logs-open

Open the log file location in your file manager:

malv logs-open

This reveals the log file in:

Options:

Option What It Does
--infra, -i Open infrastructure logs location instead

Infrastructure Logs

The infrastructure server (port 59459) has its own log file at ~/.malv/infra-logs.jsonl. Use the --infra flag to view these:

# View infrastructure logs as HTML
malv logs-html --infra

# Open infrastructure log location
malv logs-open --infra

Infrastructure logs include:

Tips

Keep logs visible while developing

Open a second terminal and run malv logs while you work. You'll see tool executions in real-time.

Clear logs before testing

Press c to clear the display before running a test scenario. This makes it easier to see just the relevant logs.

Share logs for debugging

Use malv logs-html to create a formatted snapshot you can share with teammates.