log

package
v2.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MaskAndUserTagArguments

func MaskAndUserTagArguments(args, flagsToTag, flagsToMask []string) string

MaskAndUserTagArguments is a convenient way of calling both UserTagArguments and MaskArguments on the given data. It will return the resulting string slice joined with a space between element for easy logging.

func MaskAndUserTagCBMArguments

func MaskAndUserTagCBMArguments(args []string) string

func MaskArguments

func MaskArguments(args, flagsToMask []string) []string

MaskArguments returns a new slice with the values of the flags given in flagsToMask replaced by a fix number of *.

func MaskCBMArguments

func MaskCBMArguments(args []string) []string

func UserData added in v2.1.0

func UserData(key, value string) slog.Attr

UserData returns an Attr for a string value that should be treated as user data.

func UserTagArguments

func UserTagArguments(args, flagsToTag []string) []string

UserTagArguments returns a new slice with the values for the flags given in flagsToTag surrounded by the <ud></ud> tags.

func UserTagCBMArguments

func UserTagCBMArguments(args []string) []string

Types

type UserDataValue added in v2.1.0

type UserDataValue string

UserDataValue is a string that should be treated as user data, and therefore tagged as such in the logs.

func (UserDataValue) LogValue added in v2.1.0

func (u UserDataValue) LogValue() slog.Value

Jump to

Keyboard shortcuts

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