---
title: Logcopter Generator
description: Generate package-scoped logcopter logger variables and area registries for Go packages.
doc_version: 1
last_updated: 2026-07-02
---


`logcopter-gen` scans Go packages and generates package-level logger variables backed by the logcopter runtime. Rollouts usually generate a `logcopter.go` file in each package and optionally an area registry file that lets applications validate configured log areas.

A typical repository check looks like this:

```bash
logcopter-gen \
  --area-prefix go-go-golems.my-package \
  --strip-prefix github.com/go-go-golems/my-package \
  --check \
  ./...
```

Use `--dry-run` to inspect planned writes without changing files, and use `--check` in CI to fail when generated files are stale.
