log

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DebugColor = lipgloss.AdaptiveColor{Light: "63", Dark: "63"}
	InfoColor  = lipgloss.AdaptiveColor{Light: "74", Dark: "86"}
	WarnColor  = lipgloss.AdaptiveColor{Light: "214", Dark: "192"}
	ErrorColor = lipgloss.AdaptiveColor{Light: "203", Dark: "203"}
	FatalColor = lipgloss.AdaptiveColor{Light: "134", Dark: "134"}
)

Initializing the colors for the charm logger.

Functions

func NewLogger

func NewLogger(o io.Writer) hclog.Logger

NewLogger initializes a new wrapped logger with default styles

Types

type CharmHclog

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

CharmHclog adapts the charm logger to the hashicorp logger.

func (*CharmHclog) Debug

func (c *CharmHclog) Debug(msg string, args ...interface{})

func (*CharmHclog) Error

func (c *CharmHclog) Error(msg string, args ...interface{})

func (*CharmHclog) GetLevel

func (c *CharmHclog) GetLevel() hclog.Level

The GetLevel() method returns the current level.

func (*CharmHclog) ImpliedArgs

func (c *CharmHclog) ImpliedArgs() []interface{}

func (*CharmHclog) Info

func (c *CharmHclog) Info(msg string, args ...interface{})

func (*CharmHclog) IsDebug

func (c *CharmHclog) IsDebug() bool

func (*CharmHclog) IsError

func (c *CharmHclog) IsError() bool

func (*CharmHclog) IsInfo

func (c *CharmHclog) IsInfo() bool

func (*CharmHclog) IsTrace

func (c *CharmHclog) IsTrace() bool

Methods of go-hclog interface.

func (*CharmHclog) IsWarn

func (c *CharmHclog) IsWarn() bool

func (*CharmHclog) Log

func (c *CharmHclog) Log(level hclog.Level, msg string, args ...interface{})

func (*CharmHclog) Name

func (c *CharmHclog) Name() string

The GetPrefix() method will return the prefix of the logger.

func (*CharmHclog) Named

func (c *CharmHclog) Named(name string) hclog.Logger

The Named() method appends to the current logger prefix.

func (*CharmHclog) ResetNamed

func (c *CharmHclog) ResetNamed(name string) hclog.Logger

The ResetNamed() method creates the logger with only the prefix passed.

func (*CharmHclog) SetLevel

func (c *CharmHclog) SetLevel(level hclog.Level)

The SetLevel() method enables setting logger level.

func (*CharmHclog) StandardLogger

func (c *CharmHclog) StandardLogger(opts *hclog.StandardLoggerOptions) *log.Logger

The StandardLog() of CharmHclog is returned, wrapping go-hclog.

func (*CharmHclog) StandardWriter

func (c *CharmHclog) StandardWriter(opts *hclog.StandardLoggerOptions) io.Writer

func (*CharmHclog) Trace

func (c *CharmHclog) Trace(msg string, args ...interface{})

func (*CharmHclog) Warn

func (c *CharmHclog) Warn(msg string, args ...interface{})

func (*CharmHclog) With

func (c *CharmHclog) With(args ...interface{}) hclog.Logger

Jump to

Keyboard shortcuts

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