logging

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogAppend

type LogAppend struct {
	// Key is the name of the log field.
	Key string `json:"key,omitempty"`

	// Value is the value to use for the log field.
	// If it is a placeholder (with surrounding `{}`),
	// it will be evaluated when the log is written.
	// If the value is a key that exists in the `vars`
	// map, the value of that key will be used. Otherwise
	// the value will be used as-is as a constant string.
	Value string `json:"value,omitempty"`
}

LogAppend implements a middleware that takes a key and value, where the key is the name of a log field and the value is a placeholder, or variable key, or constant value to use for that field.

func (LogAppend) KengineModule

func (LogAppend) KengineModule() kengine.ModuleInfo

KengineModule returns the Kengine module information.

func (LogAppend) ServeHTTP

func (h LogAppend) ServeHTTP(w http.ResponseWriter, r *http.Request, next kenginehttp.Handler) error

func (*LogAppend) UnmarshalKenginefile

func (h *LogAppend) UnmarshalKenginefile(d *kenginefile.Dispenser) error

UnmarshalKenginefile implements kenginefile.Unmarshaler.

Jump to

Keyboard shortcuts

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