console

package module
v0.0.0-...-9d8ded8 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Console

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

Console is a client for https://github.com/charmbracelet/log

func New

func New(o *Options) (*Console, error)

New returns a new Console.

func (*Console) New

func (c *Console) New(a ...any) logger.Log

New implements the logger.Logger interface.

type Field

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

func (*Field) Any

func (f *Field) Any(s string, a any) logger.Log

Any implements the logger.Log interface.

func (*Field) Debug

func (f *Field) Debug()

Debug implements the logger.Log interface.

func (*Field) Error

func (f *Field) Error()

Error implements the logger.Log interface.

func (*Field) Fatal

func (f *Field) Fatal()

Fatal implements the logger.Log interface.

func (*Field) Info

func (f *Field) Info()

Info implements the logger.Log interface.

func (*Field) Warn

func (f *Field) Warn()

Warn implements the logger.Log interface.

type Level

type Level string
const (
	Debug Level = "debug"
	Info  Level = "info"
	Warn  Level = "warn"
	Error Level = "error"
	Fatal Level = "fatal"
)

type Options

type Options struct {
	Level     Level
	Timestamp string
	Caller    bool
}

Options is Console options.

Jump to

Keyboard shortcuts

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