---
title: "evlog doctor"
description: "Diagnose an evlog setup — Node version, project resolution, the installed evlog version, the detected framework, and whether local logs are being written."
canonical_url: "https://www.evlog.dev/cli/doctor"
---
# evlog doctor

> Diagnose an evlog setup — Node version, project resolution, the installed evlog version, the detected framework, and whether local logs are being written.

`evlog doctor` answers "is evlog actually wired up here?", the question you have when you followed the setup guide and nothing is showing up.

```bash [Terminal]
evlog doctor
```

```text [Output]
pnpm workspace

ENVIRONMENT
│ ✓ node     v24.18.0
│ ✓ project  evlog-playground · pnpm · apps/playground
│ ✓ stack    nuxt

EVLOG
│ ✓ evlog  v2.22.3 (workspace:*)
│ ✓ logs   1 file · .evlog/logs

5 ok · 0 warn · 0 fail
```

## What it checks

<table>
<thead>
  <tr>
    <th>
      Check
    </th>
    
    <th>
      Passes when
    </th>
    
    <th>
      Warns or fails when
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        node
      </code>
    </td>
    
    <td>
      Node 22 or later
    </td>
    
    <td>
      Older than 22 — the CLI will not run reliably (fail)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        project
      </code>
    </td>
    
    <td>
      A <code>
        package.json
      </code>
      
       was resolved
    </td>
    
    <td>
      None found above the working directory
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        stack
      </code>
    </td>
    
    <td>
      A framework was detected and evlog is installed
    </td>
    
    <td>
      A framework was detected but evlog is not wired to it
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        evlog
      </code>
    </td>
    
    <td>
      <code>
        evlog
      </code>
      
       resolves from <code>
        node_modules
      </code>
    </td>
    
    <td>
      Declared in <code>
        package.json
      </code>
      
       but not installed, or missing entirely
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        config
      </code>
    </td>
    
    <td>
      <a href="https://www.evlog.dev/cli/config">
        <code>
          evlog.config.ts
        </code>
      </a>
      
       was read, and the config it extends was found
    </td>
    
    <td>
      The file cannot be read: a syntax error, a misspelt setting, or a CLI setting computed at runtime (fail). The check is omitted when there is no config
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        logs
      </code>
    </td>
    
    <td>
      A local drain exists, or the fs drain is wired (the directory appears on first write)
    </td>
    
    <td>
      Never — the check is omitted when no local drain is configured
    </td>
  </tr>
</tbody>
</table>

In a workspace, the header names the workspace kind and `project` shows which package was resolved, the fastest way to notice you are diagnosing the repo root instead of your app.

A local drain is optional: the [fs drain](https://www.evlog.dev/integrate/adapters/self-hosted/fs) writes under `.evlog/logs` and creates the directory on first write, so a wired drain counts as a drain before any event. A project with no local drain gets no `logs` check at all.

## What the exit code means

`0` when nothing failed, `1` when any check failed. Warnings do not fail the command, because a project that has not written logs yet is not broken.

## Read the result as JSON

```bash [Terminal]
evlog doctor --json | jq '.checks'
```

The payload carries the resolved project (`cwd`, `root`, `packageDir`, workspace kind, package name, detected stack), every check with its status, and the summary counts.

Each warning and failure also carries a code from the CLI's own error catalog: `cli.EVLOG_NOT_FOUND`, `cli.EVLOG_DECLARED_NOT_INSTALLED`, `cli.NODE_TOO_OLD`, `cli.PROJECT_NO_PACKAGE`, each with a `why` and a `fix`, the same way [structured errors](https://www.evlog.dev/learn/structured-errors) work in your app.

## Options

<table>
<thead>
  <tr>
    <th>
      Flag
    </th>
    
    <th>
      What it does
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        --cwd <dir>
      </code>
    </td>
    
    <td>
      Diagnose another directory
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --json
      </code>
    </td>
    
    <td>
      Machine-readable output on stdout
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --debug
      </code>
    </td>
    
    <td>
      Print the steps the command went through
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --noHeader
      </code>
    </td>
    
    <td>
      Skip the branded header
    </td>
  </tr>
</tbody>
</table>

## Next

- [Installation](https://www.evlog.dev/start/installation): wire evlog into your framework
- [`evlog map`](https://www.evlog.dev/cli/map): once it is installed, see where it is missing

---

- [Installation](https://www.evlog.dev/start/installation)


## Sitemap

See the full [sitemap](https://www.evlog.dev/sitemap.md) for all pages.
