v1.2.0 Latest Latest

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

Go to latest
Published: Jun 4, 2023 License: Apache-2.0 Imports: 0 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type LoggingT

type LoggingT struct {
	// Boolean flags. Not handled atomically because the flag.Value interface
	// does not let us avoid the =true, and that shorthand is necessary for
	// compatibility. TODO: does this matter enough to fix? Seems unlikely.
	// +optional
	ToStderr *bool `json:"logtostderr,omitempty"` // The -logtostderr flag.
	// log to standard error as well as files (no effect when -logtostderr=true)
	// +optional
	AlsoToStderr *bool `json:"alsologtostderr,omitempty"` // The -alsologtostderr flag.

	// logs at or above this threshold go to stderr when writing to files and stderr (no effect when -logtostderr=true or -alsologtostderr=false) (default 2)
	// +optional
	StderrThreshold *int `json:"stderrthreshold,omitempty"` // The -stderrthreshold flag.

	// when logging hits line file:N, emit a stack trace
	// +optional
	TraceLocation string `json:"log_backtrace_at,omitempty"`

	// comma-separated list of pattern=N settings for file-filtered logging
	// +optional
	Vmodule string `json:"vmodule,omitempty"` // The state of the -vmodule flag.
	// number for the log level verbosity
	// +optional
	Verbosity *int `json:"v,omitempty"` // V logging level, the value of the -v flag/

	// If non-empty, write log files in this directory (no effect when -logtostderr=true)
	// +optional
	LogDir string `json:"log_dir,omitempty"`

	// If non-empty, use this log file (no effect when -logtostderr=true)
	// +optional
	LogFile string `json:"log_file,omitempty"`

	// Defines the maximum size a log file can grow to (no effect when -logtostderr=true). Unit is megabytes. If the value is 0, the maximum file size is unlimited. (default 1800)
	// +kubebuilder:validation:Minimum=0
	// +optional
	LogFileMaxSizeMB *int64 `json:"log_file_max_size,omitempty"`

	// If true, avoid header prefixes in the log messages
	// +optional
	SkipHeaders *bool `json:"skip_headers,omitempty"`

	// If true, avoid headers when opening log files (no effect when -logtostderr=true)
	// +optional
	SkipLogHeaders *bool `json:"skip_log_headers,omitempty"`

	// If true, adds the file directory to the header of the log messages
	// +optional
	AddDirHeader *bool `json:"add_dir_header,omitempty"`

	// If true, only write logs to their native severity level (vs also writing to each lower severity level; no effect when -logtostderr=true)
	// +optional
	OneOutput *bool `json:"one_output,omitempty"`

klog init flags from https://github.com/openshift/velero/blob/240b4e666fe15ef98defa2b51483fe87ac9996fb/pkg/cmd/velero/velero.go#L125 loggingT collects all the global state of the logging setup. +kubebuilder:object:generate=true

func (*LoggingT) DeepCopy

func (in *LoggingT) DeepCopy() *LoggingT

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoggingT.

func (*LoggingT) DeepCopyInto

func (in *LoggingT) DeepCopyInto(out *LoggingT)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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