log

package
v0.0.0-...-049ef2a Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: MIT Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthorizationEndpointLog

func AuthorizationEndpointLog(path string, ev LogEvent,
	params map[string]string, msg string) string

func EndpointLog

func EndpointLog(endpoint, realm string, ev LogEvent,
	params map[string]string, msg string) string

func NewDefaultLogger

func NewDefaultLogger() *defaultLogger

func ProtectedResourceLog

func ProtectedResourceLog(path string, ev LogEvent,
	params map[string]string, msg string) string

func SetLevelForDefaultLogger

func SetLevelForDefaultLogger(level LogLevel)

func TokenEndpointLog

func TokenEndpointLog(grantType string, ev LogEvent,
	params map[string]string, msg string) string

Types

type LogEvent

type LogEvent int
const (
	AuthenticationFailed LogEvent = iota
	CodeChallengeFailed
	UnauthorizedGrantType
	AuthInfoConditionMismatch
	AuthSessionConditionMismatch
	ScopeConditionMismatch
	RefreshTokenConditionMismatch
	RedirectURIMismatch
	AssertionConditionMismatch
	InterfaceUnsupported
	InterfaceServerError
	InterfaceError
	InvalidScope
	InvalidDisplay
	InvalidMaxAge
	InvalidResponseType
	InvalidResponseMode
	InvalidNonce
	InvalidPrompt
	InvalidCodeVerifier
	AccessTokenGranted
	InvalidHTTPMethod
	MissingParam
	UnsupportedGrantType
	UnsupportedCodeChallengeMethod
	NoCredential
	NoEnabledClient
	NoEnabledAuthInfo
	NoEnabledAuthSession
	NoEnabledAccessToken
	NoEnabledUserId
	AccessTokenCreationFailed
	AccessTokenRefreshFailed
	DisableSessionFailed
	AuthInfoCreationFailed
	IdTokenGeneration
	LoginRequired
)

func (LogEvent) String

func (e LogEvent) String() string

type LogLevel

type LogLevel int
const (
	LogLevelDebug LogLevel = iota
	LogLevelInfo
	LogLevelWarn
	LogLevelError
	LogLevelFatal
)

func (LogLevel) String

func (level LogLevel) String() string

type Logger

type Logger interface {
	Debug(args ...interface{})
	Info(args ...interface{})
	Warn(args ...interface{})
	Error(args ...interface{})
	Fatal(args ...interface{})
	Debugf(format string, args ...interface{})
	Infof(format string, args ...interface{})
	Warnf(format string, args ...interface{})
	Errorf(format string, args ...interface{})
	Fatalf(format string, args ...interface{})
}

type TextColor

type TextColor int
const (
	Black TextColor = 30 + iota
	Red
	Green
	Yellow
	Blue
	Magenta
	Cyan
	White
)

Jump to

Keyboard shortcuts

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