# Pi Logs

Zeigt Logs der Mitai-Container auf dem Raspberry Pi.

## Backend Logs (Prod)
```bash
ssh pi "docker logs mitai-api --tail 50 --timestamps"
```

## Backend Logs (Dev)
```bash
ssh pi "docker logs dev-mitai-api --tail 50 --timestamps"
```

## Frontend Logs (Prod)
```bash
ssh pi "docker logs mitai-ui --tail 20"
```

## Logs nach Fehler filtern
```bash
ssh pi "docker logs mitai-api --tail 100 2>&1 | grep -i 'error\|exception\|traceback'"
```

## Logs live verfolgen (10 Sekunden)
```bash
ssh pi "timeout 10 docker logs mitai-api --follow 2>&1 || true"
```

## Gitea Runner Logs
```bash
ssh pi "sudo journalctl -u gitea-runner --lines 30 --no-pager"
```

## Letzter Deploy-Status
```bash
ssh pi "cat /home/lars/docker/bodytrack/.last-deploy 2>/dev/null || echo 'Keine Deploy-Info'"
```

## System-Logs (Fehler letzte Stunde)
```bash
ssh pi "sudo journalctl --since '1 hour ago' --priority err --no-pager | tail -20"
```
