shclog

package
v1.0.0-beta1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package shclog provides an type that acts like an hclog, but that outputs to a log/slog Logger

Index

Constants

View Source
const (
	TimeFormatJSON = "2006-01-02T15:04:05.000000Z0700"
	TimeFormat     = "2006-01-02T15:04:05.000Z0700"
)

Variables

This section is empty.

Functions

func New

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

Types

type Shclog

type Shclog struct {
	// contains filtered or unexported fields
}

func (*Shclog) Debug

func (l *Shclog) Debug(msg string, args ...any)

func (*Shclog) Error

func (l *Shclog) Error(msg string, args ...any)

func (*Shclog) GetLevel

func (l *Shclog) GetLevel() hclog.Level

func (*Shclog) ImpliedArgs

func (l *Shclog) ImpliedArgs() []any

func (*Shclog) Info

func (l *Shclog) Info(msg string, args ...any)

func (*Shclog) IsDebug

func (l *Shclog) IsDebug() bool

func (*Shclog) IsError

func (l *Shclog) IsError() bool

func (*Shclog) IsInfo

func (l *Shclog) IsInfo() bool

func (*Shclog) IsTrace

func (l *Shclog) IsTrace() bool

func (*Shclog) IsWarn

func (l *Shclog) IsWarn() bool

func (*Shclog) Log

func (l *Shclog) Log(level hclog.Level, msg string, args ...any)

func (*Shclog) Name

func (l *Shclog) Name() string

func (*Shclog) Named

func (l *Shclog) Named(name string) hclog.Logger

func (*Shclog) ResetNamed

func (l *Shclog) ResetNamed(name string) hclog.Logger

func (*Shclog) SetLevel

func (l *Shclog) SetLevel(level hclog.Level)

func (*Shclog) StandardLogger

func (l *Shclog) StandardLogger(opts *hclog.StandardLoggerOptions) *log.Logger

func (*Shclog) StandardWriter

func (l *Shclog) StandardWriter(opts *hclog.StandardLoggerOptions) io.Writer

func (*Shclog) Trace

func (l *Shclog) Trace(msg string, args ...any)

func (*Shclog) Warn

func (l *Shclog) Warn(msg string, args ...any)

func (*Shclog) With

func (l *Shclog) With(args ...any) hclog.Logger

Jump to

Keyboard shortcuts

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