> ## Documentation Index
> Fetch the complete documentation index at: https://hubify.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# hubify logs

> View and stream logs from experiments, agents, deployments, and system events.

# hubify logs

Unified log viewer for everything in your lab. Stream experiment output, agent activity, deployment progress, and system events from a single command.

## hubify logs

View the unified lab log stream.

<CodeGroup>
  ```bash Recent lab activity theme={null}
  hubify logs
  ```

  ```bash Follow mode (stream all events) theme={null}
  hubify logs --follow
  ```

  ```bash Last N lines theme={null}
  hubify logs --tail 50
  ```
</CodeGroup>

```
[14:02] [agent:research-lead] Completed TSK-342: MCMC convergence check
[14:01] [experiment:EXP-054] QC gate PASS (R-hat: 1.03)
[14:00] [deploy:DEP-001] Chain 6/6 converged
[13:58] [system] Pod pod-abc1234 GPU utilization: 94%
[13:45] [agent:orchestrator] Assigned TSK-342 to Research Lead
```

**Options:**

| Flag                 | Description                                           | Default |
| -------------------- | ----------------------------------------------------- | ------- |
| `--follow`           | Stream new log entries in real time                   | `false` |
| `--tail <n>`         | Show last N lines                                     | `50`    |
| `--since <duration>` | Show logs from duration ago (e.g., `1h`, `24h`, `7d`) | `1h`    |
| `--json`             | Output as JSON (one object per line)                  | `false` |

## hubify logs --agent

View logs for a specific agent.

<CodeGroup>
  ```bash Agent logs by name theme={null}
  hubify logs --agent "Research Lead"
  ```

  ```bash Follow a specific agent theme={null}
  hubify logs --agent "Orchestrator" --follow
  ```

  ```bash Agent errors only theme={null}
  hubify logs --agent "Data Lead" --level error
  ```

  ```bash All agent logs (no experiment/system noise) theme={null}
  hubify logs --agent all
  ```
</CodeGroup>

```
[14:02] [research-lead] Completed TSK-342: MCMC convergence check (2m 14s)
[13:45] [research-lead] Started TSK-342
[13:40] [research-lead] Received assignment from Orchestrator
[13:38] [research-lead] Reviewed EXP-054 outputs, QC PASS
[13:35] [research-lead] Pulled 424K posterior samples
```

**Options:**

| Flag              | Description                              | Default  |
| ----------------- | ---------------------------------------- | -------- |
| `--agent <name>`  | Agent name, or `all` for all agent logs  | Required |
| `--level <level>` | Filter: `debug`, `info`, `warn`, `error` | `info`   |
| `--follow`        | Stream new entries                       | `false`  |
| `--tail <n>`      | Last N lines                             | `50`     |

## hubify logs --experiment

View logs for a specific experiment.

<CodeGroup>
  ```bash Experiment logs theme={null}
  hubify logs --experiment EXP-054
  ```

  ```bash Follow experiment in real time theme={null}
  hubify logs --experiment EXP-054 --follow
  ```

  ```bash Show only stderr theme={null}
  hubify logs --experiment EXP-054 --stream stderr
  ```
</CodeGroup>

```
[10:42:01] Starting experiment EXP-054 on pod-abc1234
[10:42:03] Running: python run_mcmc.py --config planck_bao.yaml
[10:45:12] Chain 1/6: 1,000 samples (R-hat: 1.45)
[10:52:30] Chain 1/6: 5,000 samples (R-hat: 1.12)
[11:01:44] Chain 1/6: 10,000 samples (R-hat: 1.03) CONVERGED
[11:02:01] Chain 2/6: starting...
...
[12:57:15] All 6 chains converged. Samples: 60,241
[12:57:16] QC gate: PASS
```

**Options:**

| Flag                | Description                       | Default  |
| ------------------- | --------------------------------- | -------- |
| `--experiment <id>` | Experiment ID                     | Required |
| `--stream <stream>` | Filter: `stdout`, `stderr`, `all` | `all`    |
| `--follow`          | Stream new entries                | `false`  |
| `--tail <n>`        | Last N lines                      | `100`    |

## hubify logs --deploy

View logs for a deployment.

<CodeGroup>
  ```bash Deployment logs theme={null}
  hubify logs --deploy DEP-001
  ```

  ```bash Follow deployment theme={null}
  hubify logs --deploy DEP-001 --follow
  ```
</CodeGroup>

## hubify logs --system

View system-level events (pod lifecycle, cost alerts, errors).

<CodeGroup>
  ```bash System logs theme={null}
  hubify logs --system
  ```

  ```bash System errors only theme={null}
  hubify logs --system --level error
  ```
</CodeGroup>

```
[14:05] Pod pod-abc1234 idle for 15m (idle-timeout: 30m)
[14:00] Monthly compute spend: $142.50 / $200.00 budget
[13:55] Pod pod-o76k3jf self-extending (iteration 271)
[13:30] Pod pod-abc1234 created (H100, 50GB disk)
```

## Filtering and Search

Combine flags to narrow down log output.

<CodeGroup>
  ```bash Agent errors in the last hour theme={null}
  hubify logs --agent "Data Lead" --level error --since 1h
  ```

  ```bash Experiment output with context theme={null}
  hubify logs --experiment EXP-054 --tail 200 --since 2h
  ```

  ```bash Pipe to grep for specific patterns theme={null}
  hubify logs --experiment EXP-054 | grep "R-hat"
  ```
</CodeGroup>

## Log Levels

| Level   | Description                                          |
| ------- | ---------------------------------------------------- |
| `debug` | Verbose diagnostic output (usually suppressed)       |
| `info`  | Normal operational events                            |
| `warn`  | Non-fatal issues (e.g., slow convergence, high cost) |
| `error` | Failures requiring attention                         |
