loggers

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ID              = "loggers"
	EnableByDefault = true
)

Variables

View Source
var Module = &bootstrap.Module{
	Name:       "actuator-loggers",
	Precedence: actuator.MinActuatorPrecedence,
	Options: []fx.Option{
		fx.Invoke(register),
	},
}

Functions

func Register

func Register()

Types

type LoggerLevel

type LoggerLevel struct {
	EffectiveLevel  *log.LoggingLevel `json:"effectiveLevel,omitempty"`
	ConfiguredLevel *log.LoggingLevel `json:"configuredLevel,omitempty"`
}

type LoggersEndpoint

type LoggersEndpoint struct {
	actuator.WebEndpointBase
	// contains filtered or unexported fields
}

LoggersEndpoint implements actuator.Endpoint, actuator.WebEndpoint

func (*LoggersEndpoint) MappingPath

func (*LoggersEndpoint) Mappings

func (ep *LoggersEndpoint) Mappings(op actuator.Operation, group string) ([]web.Mapping, error)

Mappings implements WebEndpoint

func (*LoggersEndpoint) ReadAll

func (ep *LoggersEndpoint) ReadAll(_ context.Context, _ *struct{}) (interface{}, error)

ReadAll returns all loggers

func (*LoggersEndpoint) ReadByName

func (ep *LoggersEndpoint) ReadByName(_ context.Context, in *ReadInput) (interface{}, error)

ReadByName find one logger by name

func (*LoggersEndpoint) Write

func (ep *LoggersEndpoint) Write(_ context.Context, in *WriteInput) (interface{}, error)

Write update logger levels

func (*LoggersEndpoint) WriteEncodeResponse

func (ep *LoggersEndpoint) WriteEncodeResponse(_ context.Context, rw http.ResponseWriter, _ interface{}) error

type ReadInput

type ReadInput struct {
	Name string `uri:"name"`
}

type ReadOutput

type ReadOutput struct {
	Levels  []log.LoggingLevel     `json:"levels"`
	Loggers map[string]LoggerLevel `json:"loggers"`
}

type WriteInput

type WriteInput struct {
	Prefix          string            `uri:"name" binding:"required"`
	ConfiguredLevel *log.LoggingLevel `json:"configuredLevel"`
}

Jump to

Keyboard shortcuts

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