Documentation ¶
Index ¶
- Constants
- type Logger
- func (l *Logger) Debug(ctx context.Context, v ...interface{}) error
- func (l *Logger) Debugf(ctx context.Context, format string, v ...interface{}) error
- func (l *Logger) Error(ctx context.Context, v ...interface{}) error
- func (l *Logger) Errorf(ctx context.Context, format string, v ...interface{}) error
- func (l *Logger) Info(ctx context.Context, v ...interface{}) error
- func (l *Logger) Infof(ctx context.Context, format string, v ...interface{}) error
- func (l *Logger) Output(calldepth int, s string) error
- func (l *Logger) Warning(ctx context.Context, v ...interface{}) error
- func (l *Logger) Warningf(ctx context.Context, format string, v ...interface{}) error
Constants ¶
View Source
const ( DEBUG int = iota INFO WARNING ERROR )
Default four levels for logging.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
func New ¶
New creates a new Logger instance, which writes to the specified destination (file) or stdout if dest is empty. It also sets the log level.
Click to show internal directories.
Click to hide internal directories.