transformer

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: MIT Imports: 3 Imported by: 10

Documentation

Index

Constants

View Source
const (
	// PrefixTokenSeparator is and string printed between prefix and ansible output
	PrefixTokenSeparator = "\u2500\u2500"

	// DefaultLogFormatLayout is the default format when is used the LogFormat transformer
	DefaultLogFormatLayout = "2006-01-02 15:04:05"
)

Variables

This section is empty.

Functions

func Now

func Now(layout string) string

Now returns a time value according to layout

Types

type TransformerFunc

type TransformerFunc func(string) string

TransformerFunc is used to enrich or update messages before to be printed out

func Append

func Append(expression string) TransformerFunc

Append is a transformer function that includes a suffix to a message expression

func IgnoreMessage

func IgnoreMessage(skipPatterns []string) TransformerFunc

IgnoreMessage is a transformer function that returns a blank string when the message match to any skipping pattern

func LogFormat

func LogFormat(layout string, f func(string) string) TransformerFunc

LogFormat is a transformer function that includes a time reference at the beginning of a message expression

func Prepend

func Prepend(expression string) TransformerFunc

Prepend is a transformer function that includes a prefix to a message expression

Jump to

Keyboard shortcuts

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