Documentation ¶
Overview ¶
Package log provides logging utilities
Index ¶
- type Context
- type Logger
- func (l *Logger) Error(err error)
- func (l *Logger) Errorc(ctx Context, err error)
- func (l *Logger) Errorf(format string, v ...interface{})
- func (l *Logger) Fatal(err error)
- func (l *Logger) Info(msg string)
- func (l *Logger) Infoc(ctx Context, msg string)
- func (l *Logger) Infof(format string, v ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger wraps a log file and the standard logger
func New ¶
func New(c config.LogOptions) (*Logger, error)
New sets up a new logger which writes to file at 'path' with 'prefix'
func (*Logger) Error ¶
Error logs an error via the underlying standard logger
func (*Logger) Errorc ¶
Errorc logs an error with context via the underlying standard logger
func (*Logger) Errorf ¶
Errorf logs an error via the underlying standard logger
func (*Logger) Fatal ¶
Fatal logs an error via the underlying standard logger and exists with code 1
func (*Logger) Info ¶
Info logs a info message via the underlying standard logger
func (*Logger) Infoc ¶
Infoc logs a info message with context via the underlying standard logger
Click to show internal directories.
Click to hide internal directories.