Documentation ¶
Index ¶
- Constants
- Variables
- func ErrController(err error, msg string) error
- type Controller
- func (c *Controller) Enabled(level int) bool
- func (c *Controller) Error(err error, msg string, keysAndValues ...interface{})
- func (c *Controller) Info(level int, msg string, keysAndValues ...interface{})
- func (c *Controller) Init(info logr.RuntimeInfo)
- func (c *Controller) V(level int) *Controller
- func (c *Controller) WithName(name string) logr.LogSink
- func (c *Controller) WithValues(keysAndValues ...interface{}) logr.LogSink
- type Database
- func (c *Database) Error(ctx context.Context, msg string, data ...interface{})
- func (c *Database) Info(ctx context.Context, msg string, data ...interface{})
- func (c *Database) LogMode(level gormlogger.LogLevel) gormlogger.Interface
- func (c *Database) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error)
- func (c *Database) Warn(ctx context.Context, msg string, data ...interface{})
- type Format
- type Handler
- type Logger
- func (l *Logger) ControllerLogger() logr.Logger
- func (l *Logger) DatabaseLogger() gormlogger.Interface
- func (l *Logger) Debug(description ...interface{})
- func (l *Logger) Error(err error)
- func (l *Logger) GetLevel() logrus.Level
- func (l *Logger) Info(description ...interface{})
- func (l *Logger) Infof(format string, args ...interface{})
- func (l *Logger) SetLevel(level logrus.Level)
- func (l *Logger) UpdateLogOutput(output io.Writer)
- func (l *Logger) Warn(err error)
- func (l *Logger) Warnf(format string, args ...interface{})
- type Options
- type TerminalFormatter
Constants ¶
View Source
const ( JsonLogFormat = iota SyslogLogFormat TerminalLogFormat )
Variables ¶
View Source
var (
ErrControllerCode = "11071"
)
Functions ¶
func ErrController ¶ added in v0.2.15
Types ¶
type Controller ¶ added in v0.1.31
type Controller struct {
// contains filtered or unexported fields
}
func (*Controller) Enabled ¶ added in v0.1.31
func (c *Controller) Enabled(level int) bool
func (*Controller) Error ¶ added in v0.1.31
func (c *Controller) Error(err error, msg string, keysAndValues ...interface{})
func (*Controller) Info ¶ added in v0.1.31
func (c *Controller) Info(level int, msg string, keysAndValues ...interface{})
func (*Controller) Init ¶ added in v0.5.14
func (c *Controller) Init(info logr.RuntimeInfo)
func (*Controller) V ¶ added in v0.1.31
func (c *Controller) V(level int) *Controller
func (*Controller) WithName ¶ added in v0.1.31
func (c *Controller) WithName(name string) logr.LogSink
func (*Controller) WithValues ¶ added in v0.1.31
func (c *Controller) WithValues(keysAndValues ...interface{}) logr.LogSink
type Database ¶ added in v0.2.4
type Database struct {
// contains filtered or unexported fields
}
func (*Database) LogMode ¶ added in v0.2.4
func (c *Database) LogMode(level gormlogger.LogLevel) gormlogger.Interface
type Handler ¶
type Handler interface { Info(description ...interface{}) Infof(format string, args ...interface{}) Debug(description ...interface{}) Warn(err error) Warnf(format string, args ...interface{}) Error(err error) SetLevel(level logrus.Level) GetLevel() logrus.Level UpdateLogOutput(w io.Writer) // Kubernetes Controller compliant logger ControllerLogger() logr.Logger DatabaseLogger() gormlogger.Interface }
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func (*Logger) ControllerLogger ¶ added in v0.1.31
func (*Logger) DatabaseLogger ¶ added in v0.2.4
func (l *Logger) DatabaseLogger() gormlogger.Interface
func (*Logger) UpdateLogOutput ¶ added in v0.7.12
type TerminalFormatter ¶ added in v0.5.1
type TerminalFormatter struct{}
TerminalFormatter is exported
Click to show internal directories.
Click to hide internal directories.