hclog2slog

package
v0.9.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

The adapter maps slog levels to hclog levels and preserves key/value fields.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(hclLogger hclog.Logger) *slog.Logger

New creates a new slog.Logger backed by an hclog.Logger.

The returned *slog.Logger will send all log events to the given hclog.Logger with compatible levels and fields.

func NewWithLevel

func NewWithLevel(hclLogger hclog.Logger, logLevel hclog.Level) *slog.Logger

func NewWithStringLevel

func NewWithStringLevel(hclLogger hclog.Logger, logLevel string) *slog.Logger

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL