tui

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultStyles = log.Styles{
		Timestamp: defaultStyle,
		Caller:    defaultStyle.Faint(true),
		Prefix:    defaultStyle.Bold(true).Faint(true),
		Message:   defaultStyle,
		Key:       defaultStyle.Faint(true),
		Value:     defaultStyle.Faint(true),
		Separator: defaultStyle.Faint(true),
		Levels: map[log.Level]lipgloss.Style{

			log.DebugLevel: defaultStyle.
				SetString(debugPrefix.Render(debugLabel)).
				Bold(true),
			log.InfoLevel: defaultStyle.
				SetString(infoPrefix.Render(infoLabel)).
				Bold(true),
			log.WarnLevel: defaultStyle.
				SetString(warnPrefix.Render(warningLabel)).
				Bold(true),
			log.ErrorLevel: defaultStyle.
				SetString(errorPrefix.Render(errorLabel)).
				Bold(true),
			log.FatalLevel: defaultStyle.
				SetString(errorPrefix.Render(fatalLabel)).
				Bold(true),
			// contains filtered or unexported fields
		},
		Keys:   map[string]lipgloss.Style{},
		Values: map[string]lipgloss.Style{},
	}
)

Functions

func CreateLogger added in v0.4.0

func CreateLogger(logger *log.Logger, prefix string) *log.Logger
func Logo(version string) string

func PrintInfoBox

func PrintInfoBox(out io.Writer, message string)

func PrintResponse

func PrintResponse(logger contracts.Logger, request *contracts.Request, statusCode int)

func PrintWarningBox

func PrintWarningBox(out io.Writer, message string)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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