Documentation ¶
Index ¶
- Variables
- type LogFormatFactory
- type LogFormatRegistry
- func (lfr *LogFormatRegistry) Delete(name string) error
- func (lfr *LogFormatRegistry) Freeze()
- func (lfr *LogFormatRegistry) Get(name string) (LogFormatFactory, error)
- func (lfr *LogFormatRegistry) List() []string
- func (lfr *LogFormatRegistry) Register(name string, factory LogFormatFactory) error
- func (lfr *LogFormatRegistry) Set(name string, factory LogFormatFactory) error
Constants ¶
This section is empty.
Variables ¶
View Source
var LogRegistry = NewLogFormatRegistry()
LogRegistry is new init LogFormatRegistry struct
Functions ¶
This section is empty.
Types ¶
type LogFormatFactory ¶
type LogFormatFactory interface { // Create returns a logger with the requested configuration. // Returning a flush function for the logger is optional. // If provided, the caller must ensure that it is called // periodically (if desired) and at program exit. Create(c config.LoggingConfiguration) (log logr.Logger, flush func()) }
LogFormatFactory provides support for a certain additional, non-default log format.
type LogFormatRegistry ¶
type LogFormatRegistry struct {
// contains filtered or unexported fields
}
LogFormatRegistry store klog format registry
func NewLogFormatRegistry ¶
func NewLogFormatRegistry() *LogFormatRegistry
NewLogFormatRegistry return new init LogFormatRegistry struct
func (*LogFormatRegistry) Delete ¶
func (lfr *LogFormatRegistry) Delete(name string) error
Delete specified log format logger
func (*LogFormatRegistry) Freeze ¶
func (lfr *LogFormatRegistry) Freeze()
Freeze freezes the log format registry
func (*LogFormatRegistry) Get ¶
func (lfr *LogFormatRegistry) Get(name string) (LogFormatFactory, error)
Get specified log format logger
func (*LogFormatRegistry) List ¶
func (lfr *LogFormatRegistry) List() []string
List names of registered log formats (sorted)
func (*LogFormatRegistry) Register ¶
func (lfr *LogFormatRegistry) Register(name string, factory LogFormatFactory) error
Register new log format registry to global logRegistry. nil is valid and selects the default klog output.
func (*LogFormatRegistry) Set ¶
func (lfr *LogFormatRegistry) Set(name string, factory LogFormatFactory) error
Set specified log format logger
Click to show internal directories.
Click to hide internal directories.