Documentation ¶
Index ¶
- Variables
- type LogrusSink
- func (sink *LogrusSink) Enabled(level int) bool
- func (sink *LogrusSink) Error(err error, msg string, keysAndValues ...interface{})
- func (sink *LogrusSink) Info(_ int, msg string, keysAndValues ...interface{})
- func (sink *LogrusSink) Init(_ logr.RuntimeInfo)
- func (sink *LogrusSink) WithName(name string) logr.LogSink
- func (sink *LogrusSink) WithValues(keysAndValues ...interface{}) logr.LogSink
Constants ¶
This section is empty.
Variables ¶
var ( // NamespacedVerifiers is a map between namespace and verifiers. NamespacedVerifiers = verifiers.NewActiveVerifiers() // NamespacedPolicies is the active policy generated from CRD. There would be exactly // one active policy belonging to a namespace at any given time. NamespacedPolicies = policies.NewActivePolicies() // NamespacedStores is a map to track active stores across namespaces. NamespacedStores = rs.NewActiveStores() // NamespacedCertStores is a map between namespace and CertificateStores. NamespacedCertStores = cs.NewActiveCertStores() )
Functions ¶
This section is empty.
Types ¶
type LogrusSink ¶
type LogrusSink struct {
// contains filtered or unexported fields
}
LogrusSink is an adapter to allow the use of logrus with logr, as required by k8s controller-runtime.
func NewLogrusSink ¶
func NewLogrusSink(logger *logrus.Logger) *LogrusSink
func (*LogrusSink) Enabled ¶
func (sink *LogrusSink) Enabled(level int) bool
Enabled tests whether this LogSink is enabled at the specified V-level. For example, commandline flags might be used to set the logging verbosity and disable some info logs.
func (*LogrusSink) Error ¶
func (sink *LogrusSink) Error(err error, msg string, keysAndValues ...interface{})
Error logs an error, with the given message and key/value pairs as context. See Logger.Error for more details.
func (*LogrusSink) Info ¶
func (sink *LogrusSink) Info(_ int, msg string, keysAndValues ...interface{})
Info logs a non-error message with the given key/value pairs as context. The level argument is provided for optional logging. This method will only be called when Enabled(level) is true. See Logger.Info for more details.
func (*LogrusSink) Init ¶
func (sink *LogrusSink) Init(_ logr.RuntimeInfo)
Init receives optional information about the logr library for LogSink implementations that need it.
func (*LogrusSink) WithName ¶
func (sink *LogrusSink) WithName(name string) logr.LogSink
WithName returns a new LogSink with the specified name appended. See Logger.WithName for more details.
func (*LogrusSink) WithValues ¶
func (sink *LogrusSink) WithValues(keysAndValues ...interface{}) logr.LogSink
WithValues returns a new LogSink with additional key/value pairs. See Logger.WithValues for more details.