logging

package
v0.0.34 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

func LogToProgram

func LogToProgram(prog *tea.Program)

Types

type DoneMsg

type DoneMsg struct{}

type LogMsg

type LogMsg []byte

type Model

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

func NewShell

func NewShell(content tea.Model, options ...ShellOption) Model

func (Model) Init

func (m Model) Init() tea.Cmd

Init implements tea.Model.

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update implements tea.Model.

func (Model) View

func (m Model) View() string

View implements tea.Model.

type ShellOption

type ShellOption func(*Model)

func WithContext

func WithContext(ctx context.Context) ShellOption

func WithLogger

func WithLogger(log *log.Logger) ShellOption

WithLogger sets the output of the specified logger to print above the given content. I'm not actually sure if this works yet because I'm bad at concurrency.

type TeaLogger

type TeaLogger struct{ *tea.Program }

func (*TeaLogger) Write

func (log *TeaLogger) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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