logs

package
v2.0.21 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: Apache-2.0, Apache-2.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	FlyteEnableVscode = "_F_E_VS"
)

Variables

View Source
var (
	DefaultConfig = LogConfig{
		IsKubernetesEnabled:   true,
		KubernetesTemplateURI: "http://localhost:30082/#!/log/{{ .namespace }}/{{ .podName }}/pod?namespace={{ .namespace }}",
	}
)

Functions

func GetLogsForContainerInPod

func GetLogsForContainerInPod(ctx context.Context, logPlugin tasklog.Plugin, taskExecID pluginsCore.TaskExecutionID, pod *v1.Pod, index uint32, nameSuffix string, extraLogTemplateVars []tasklog.TemplateVar, taskTemplate *core.TaskTemplate) ([]*core.TaskLog, error)

Internal

func InitializeLogPlugins

func InitializeLogPlugins(cfg *LogConfig, taskTemplate *core.TaskTemplate) (tasklog.Plugin, error)

InitializeLogPlugins initializes log plugin based on config.

func SetLogConfig

func SetLogConfig(logConfig *LogConfig) error

SetLogConfig should be used for unit testing only

Types

type LogConfig

type LogConfig struct {
	IsCloudwatchEnabled bool `json:"cloudwatch-enabled" pflag:",Enable Cloudwatch Logging"`
	// Deprecated: Please use CloudwatchTemplateURI
	CloudwatchRegion string `json:"cloudwatch-region" pflag:",AWS region in which Cloudwatch logs are stored."`
	// Deprecated: Please use CloudwatchTemplateURI
	CloudwatchLogGroup    string              `json:"cloudwatch-log-group" pflag:",Log group to which streams are associated."`
	CloudwatchTemplateURI tasklog.TemplateURI `json:"cloudwatch-template-uri" pflag:",Template Uri to use when building cloudwatch log links"`

	IsKubernetesEnabled bool `json:"kubernetes-enabled" pflag:",Enable Kubernetes Logging"`
	// Deprecated: Please use KubernetesTemplateURI
	KubernetesURL         string              `json:"kubernetes-url" pflag:",Console URL for Kubernetes logs"`
	KubernetesTemplateURI tasklog.TemplateURI `json:"kubernetes-template-uri" pflag:",Template Uri to use when building kubernetes log links"`

	IsStackDriverEnabled bool `json:"stackdriver-enabled" pflag:",Enable Log-links to stackdriver"`
	// Deprecated: Please use StackDriverTemplateURI
	GCPProjectName string `json:"gcp-project" pflag:",Name of the project in GCP"`
	// Deprecated: Please use StackDriverTemplateURI
	StackdriverLogResourceName string              `json:"stackdriver-logresourcename" pflag:",Name of the logresource in stackdriver"`
	StackDriverTemplateURI     tasklog.TemplateURI `json:"stackdriver-template-uri" pflag:",Template Uri to use when building stackdriver log links"`

	DynamicLogLinks map[string]tasklog.TemplateLogPlugin `json:"dynamic-log-links" pflag:"-,Map of dynamic log links"`

	Templates []tasklog.TemplateLogPlugin `json:"templates" pflag:"-,"`

	AzureLogTemplates []tasklog.AzureLogsTemplatePlugin `json:"azure-log-templates" pflag:"-,"`
}

LogConfig encapsulates plugins' log configs

func GetLogConfig

func GetLogConfig() *LogConfig

func (LogConfig) GetPFlagSet

func (cfg LogConfig) GetPFlagSet(prefix string) *pflag.FlagSet

GetPFlagSet will return strongly types pflags for all fields in LogConfig and its nested types. The format of the flags is json-name.json-sub-name... etc.

Jump to

Keyboard shortcuts

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