log

package
v2.10.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogDirectory                 = ".logs"
	LogFileTimestampPrefixFormat = "20060102-150405"
)

Variables

This section is empty.

Functions

func Debug

func Debug(msg string, a ...interface{})

func Error

func Error(msg string, a ...interface{})

func ErrorFilePath added in v2.8.1

func ErrorFilePath() string

ErrorFilePath returns the path of an error logfile for the current execution time - depending on when this function is called such a file may not yet exist

func Fatal

func Fatal(msg string, a ...interface{})

func Info

func Info(msg string, a ...interface{})

func Level

func Level() loggers.LogLevel

func LogFilePath added in v2.8.1

func LogFilePath() string

LogFilePath returns the path of a logfile for the current execution time - depending on when this function is called such a file may not yet exist

func PrepareLogging

func PrepareLogging(fs afero.Fs, verbose bool, loggerSpy io.Writer)

func Warn

func Warn(msg string, a ...interface{})

func WithCtxFields

func WithCtxFields(ctx context.Context) loggers.Logger

WithCtxFields creates a logger instance with preset structured logging field.Field based on the Context Coordinate (via CtxKeyCoord) and environment (via CtxKeyEnv CtxValEnv) information is added to logs from the Context

func WithFields

func WithFields(fields ...field.Field) loggers.Logger

WithFields adds additional field.Field for structured logs It accepts vararg fields and should not be called more than once per log call

Types

type CtxGraphComponentId added in v2.6.0

type CtxGraphComponentId struct{}

CtxGraphComponentId context key used for correlating logs that belong to deployment of a sub graph

type CtxKeyAccount added in v2.10.0

type CtxKeyAccount struct{}

CtxKeyAccount context key used for contextual account information

type CtxKeyCoord

type CtxKeyCoord struct{}

CtxKeyCoord context key used for contextual coordinate information

type CtxKeyEnv

type CtxKeyEnv struct{}

CtxKeyEnv context key used for contextual environment information

type CtxValEnv

type CtxValEnv struct {
	Name  string
	Group string
}

CtxValEnv context value used for contextual environment information

type CtxValGraphComponentId added in v2.6.0

type CtxValGraphComponentId int

CtxValGraphComponentId context value used for correlating logs that belong to deployment of a sub graph

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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