Documentation ¶
Index ¶
- Constants
- Variables
- func AddFlags(fs *pflag.FlagSet)
- func BindLoggingFlags(c *config.LoggingConfiguration, fs *pflag.FlagSet)
- func FlushLogs()
- func GlogSetter(val string) (string, error)
- func InitLogs()
- func NewLogger(prefix string) *log.Logger
- func UnsupportedLoggingFlags(normalizeFunc func(name string) string) []string
- func ValidateLoggingConfiguration(c *config.LoggingConfiguration, fldPath *field.Path) field.ErrorList
- type KlogWriter
- type LogFormatRegistry
- func (lfr *LogFormatRegistry) Delete(name string) error
- func (lfr *LogFormatRegistry) Freeze()
- func (lfr *LogFormatRegistry) Get(name string) (logr.Logger, error)
- func (lfr *LogFormatRegistry) List() []string
- func (lfr *LogFormatRegistry) Register(name string, logger logr.Logger) error
- func (lfr *LogFormatRegistry) Set(name string, logger logr.Logger) error
- type Options
Constants ¶
const ( DefaultLogFormat = "text" JSONLogFormat = "json" )
Supported klog formats
Variables ¶
var LogRegistry = NewLogFormatRegistry()
LogRegistry is new init LogFormatRegistry struct
Functions ¶
func AddFlags ¶
AddFlags registers this package's flags on arbitrary FlagSets, such that they point to the same value as the global flags.
func BindLoggingFlags ¶ added in v0.22.0
func BindLoggingFlags(c *config.LoggingConfiguration, fs *pflag.FlagSet)
BindLoggingFlags binds the Options struct fields to a flagset
func GlogSetter ¶
GlogSetter is a setter to set glog level.
func UnsupportedLoggingFlags ¶ added in v0.22.0
UnsupportedLoggingFlags lists unsupported logging flags
func ValidateLoggingConfiguration ¶ added in v0.22.0
Types ¶
type KlogWriter ¶
type KlogWriter struct{}
KlogWriter serves as a bridge between the standard log package and the glog package.
type LogFormatRegistry ¶ added in v0.19.0
type LogFormatRegistry struct {
// contains filtered or unexported fields
}
LogFormatRegistry store klog format registry
func NewLogFormatRegistry ¶ added in v0.19.0
func NewLogFormatRegistry() *LogFormatRegistry
NewLogFormatRegistry return new init LogFormatRegistry struct
func (*LogFormatRegistry) Delete ¶ added in v0.19.0
func (lfr *LogFormatRegistry) Delete(name string) error
Delete specified log format logger
func (*LogFormatRegistry) Freeze ¶ added in v0.19.0
func (lfr *LogFormatRegistry) Freeze()
Freeze freezes the log format registry
func (*LogFormatRegistry) Get ¶ added in v0.19.0
func (lfr *LogFormatRegistry) Get(name string) (logr.Logger, error)
Get specified log format logger
func (*LogFormatRegistry) List ¶ added in v0.19.0
func (lfr *LogFormatRegistry) List() []string
List names of registered log formats (sorted)
type Options ¶ added in v0.19.0
type Options struct {
Config config.LoggingConfiguration
}
Options has klog format parameters
Directories ¶
Path | Synopsis |
---|---|
Package datapol contains functions to determine if objects contain sensitive data to e.g.
|
Package datapol contains functions to determine if objects contain sensitive data to e.g. |
example
|
|