Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SSHLogger ¶
type SSHLogger struct {
// contains filtered or unexported fields
}
func (*SSHLogger) TeaHandler ¶
You can wire any Bubble Tea model up to the middleware with a function that handles the incoming ssh.Session. Here we just grab the terminal info and pass it to the new model. You can also return tea.ProgramOptions (such as tea.WithAltScreen) on a session by session basis.
func (*SSHLogger) WithConnectProgram ¶
WithConnectProgram generates a tea ProgramOption that hooks the program into the SSH logger.
type Styles ¶
type Styles struct {
// Timestamp is the style for timestamps.
Timestamp lipgloss.Style
// Caller is the style for source caller.
Caller lipgloss.Style
// Prefix is the style for prefix.
Prefix lipgloss.Style
// Message is the style for messages.
Message lipgloss.Style
// Key is the style for keys.
Key lipgloss.Style
// Value is the style for values.
Value lipgloss.Style
// Separator is the style for separators.
Separator lipgloss.Style
// Levels are the styles for each level.
Levels map[zerolog.Level]lipgloss.Style
// Keys overrides styles for specific keys.
Keys map[string]lipgloss.Style
// Values overrides value styles for specific keys.
Values map[string]lipgloss.Style
}
Styles defines the styles for the text logger.
Click to show internal directories.
Click to hide internal directories.