logging

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 1 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	S        string
	Severity diag.Severity
}

Message stores a log string and the severity for the log message.

func ErrorMessage

func ErrorMessage(msg string) Message

ErrorMessage creates a Message with Severity set to Error.

func StatusMessage

func StatusMessage(msg string) Message

StatusMessage creates a Message with Severity set to Info.

func WarningMessage

func WarningMessage(msg string) Message

WarningMessage creates a Message with Severity set to Warning.

func (Message) Empty

func (m Message) Empty() bool

Empty returns true if the Message is uninitialized, false otherwise.

func (Message) String

func (m Message) String() string

type Messages

type Messages []Message

Messages is a slice of Message types.

func (Messages) Errors

func (m Messages) Errors() Messages

Errors returns Messages with Error severity.

func (Messages) Infos

func (m Messages) Infos() Messages

Infos returns Messages with Info severity.

func (Messages) MessagesWithSeverity

func (m Messages) MessagesWithSeverity(sev ...diag.Severity) Messages

MessagesWithSeverity returns Messages matching any of the provided Severity levels.

func (Messages) Warnings

func (m Messages) Warnings() Messages

Warnings returns Messages with Warning severity.

Jump to

Keyboard shortcuts

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