Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildAttributes ¶
func NewLogging ¶
func NewLogging(logger *slog.Logger, source string, customAttributeAssigner AttributeManager) mux.MiddlewareFunc
If source is empty, it will be set to "ApiRequestLog" If ANY fields in customAttributeAssigner are empty, or the struct itself is empty, default initializer and assigner will be set
Types ¶
type AttributeManager ¶
type AttributeManager struct {
AttributeInitializer initFunc // sets keys for custom attributes at the beginning of ServeHTTP()
AttributeAssigner loggingFunc // assigns values for custom attributes after request has completed
}
Click to show internal directories.
Click to hide internal directories.