Transports
A transport is what actually emits a log entry: to stdout, to a file, to a third-party logger like zerolog or zap, to a remote service. The core LogLayer assembles the entry; the transport renders it.
Available transports
Renderers
Self-contained transports that format the entry and write it to an io.Writer. Pick one of these when you want LogLayer to do the rendering itself.
| Name | Version | Go Reference | Description |
|---|---|---|---|
| Blank | Delegates dispatch to a user-supplied function. For prototyping or one-off integrations. | ||
| CLI | Tuned for CLI apps: short level prefixes, stdout/stderr routing, TTY-detected color, no timestamps. | ||
| Console | Plain fmt.Println-style output to stdout/stderr; minimal formatting. | ||
| Pretty | Colorized, theme-aware terminal output. Recommended for local dev. | ||
| Structured | One JSON object per log entry. Recommended for production. | ||
| Testing | Captures entries in memory for tests. |
Cloud
Managed log services. Async + batched by default; site-aware where applicable.
| Name | Version | Go Reference | Description |
|---|---|---|---|
| Axiom | Ships logs to Axiom via caller-supplied *axiom.Client. NDJSON ingestion with configurable message field. | ||
| Better Stack | Ships logs to Better Stack via HTTP intake. Source token auth, configurable timestamp field. | ||
| Datadog | Datadog Logs HTTP intake. Site-aware URL, DD-API-KEY header, status mapping. | ||
| Google Cloud Logging | Forwards entries to a caller-supplied *logging.Logger from cloud.google.com/go/logging. Severity mapping, root-level Entry skeleton, async + sync dispatch. | ||
| New Relic | New Relic Log Ingest API. Site-aware URL, api-key header, LogEvent encoding. | ||
| Sentry | Forwards entries to a sentry.Logger. Routes fatal/panic through LFatal so loglayer's core controls termination. |
Other Transports
Generic shippers and on-disk sinks.
| Name | Version | Go Reference | Description |
|---|---|---|---|
| File (Lumberjack) | One JSON object per line written to a rotating file. Backed by lumberjack.v2. | ||
| HTTP | Generic batched HTTP POST to any endpoint. Pluggable Encoder. | ||
| OpenTelemetry Logs | Emits to an OTel log.Logger. Forwards WithContext so SDK processors can correlate with the active span. |
Supported Loggers
Transports that hand the entry off to an existing third-party logger you already configure. Pick one of these when you have an established logging stack and want LogLayer's API on top.
| Name | Version | Go Reference | Description |
|---|---|---|---|
| charmbracelet/log | Pretty terminal-friendly logger from Charm | ||
| log/slog | Wraps a stdlib *slog.Logger. Forwards WithContext to handlers. | ||
| logrus | The classic structured logger | ||
| phuslu/log | High-performance zero-alloc JSON logger. Always exits on fatal. | ||
| Zap | Wraps a *zap.Logger | ||
| Zerolog | Wraps a *zerolog.Logger |
A single LogLayer can fan out to several transports at once, see Multiple Transports. To wrap a logger LogLayer doesn't ship a transport for, see Creating Transports.
