logging

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 4 Imported by: 86

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Middleware

func Middleware() wish.Middleware

Middleware provides basic connection logging. Connects are logged with the remote address, invoked command, TERM setting, window dimensions, client version, and if the auth was public key based. Disconnect will log the remote address and connection duration.

It will use charmbracelet/log.StandardLog() by default.

func MiddlewareWithLogger added in v0.6.0

func MiddlewareWithLogger(logger Logger) wish.Middleware

MiddlewareWithLogger provides basic connection logging. Connects are logged with the remote address, invoked command, TERM setting, window dimensions, client version, and if the auth was public key based. Disconnect will log the remote address and connection duration.

func StructuredMiddleware added in v1.4.0

func StructuredMiddleware() wish.Middleware

StructuredMiddleware provides basic connection logging in a structured form. Connects are logged with the remote address, invoked command, TERM setting, window dimensions, client version, and if the auth was public key based. Disconnect will log the remote address and connection duration.

It will use the charmbracelet/log.Default() and Info level by default.

func StructuredMiddlewareWithLogger added in v1.4.0

func StructuredMiddlewareWithLogger(logger *log.Logger, level log.Level) wish.Middleware

StructuredMiddlewareWithLogger provides basic connection logging in a structured form. Connects are logged with the remote address, invoked command, TERM setting, window dimensions, client version, and if the auth was public key based. Disconnect will log the remote address and connection duration.

Types

type Logger added in v0.6.0

type Logger interface {
	Printf(format string, v ...interface{})
}

Logger is the interface that wraps the basic Log method.

Jump to

Keyboard shortcuts

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