Documentation
¶
Index ¶
- type DefaultLogger
- func (dl *DefaultLogger) Begin(ctx context.Context, f string)
- func (dl *DefaultLogger) Errorf(ctx context.Context, s string, args ...interface{})
- func (dl *DefaultLogger) Infof(ctx context.Context, s string, args ...interface{})
- func (dl *DefaultLogger) Warningf(ctx context.Context, s string, args ...interface{})
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultLogger ¶
type DefaultLogger struct {
// contains filtered or unexported fields
}
DefaultLogger is the logger used when no other is specified.
func NewDefaultLogger ¶
func NewDefaultLogger() *DefaultLogger
NewDefaultLogger creates the default logger with settings found in the process environment.
func (*DefaultLogger) Begin ¶
func (dl *DefaultLogger) Begin(ctx context.Context, f string)
Begin writes a default log at the begining of a function.
func (*DefaultLogger) Errorf ¶
func (dl *DefaultLogger) Errorf(ctx context.Context, s string, args ...interface{})
Errorf is used for logging at info level.
type Logger ¶
type Logger interface { Begin(ctx context.Context, f string) Infof(ctx context.Context, s string, args ...interface{}) Warningf(ctx context.Context, s string, args ...interface{}) Errorf(ctx context.Context, s string, args ...interface{}) }
Logger defines all methods required by an logger.
Click to show internal directories.
Click to hide internal directories.