Documentation ¶
Index ¶
- Constants
- func Debug(args ...interface{})
- func Debugf(format string, args ...interface{})
- func Error(args ...interface{})
- func Errorf(format string, args ...interface{})
- func Fatal(args ...interface{})
- func Fatalf(format string, args ...interface{})
- func Info(args ...interface{})
- func Infof(format string, args ...interface{})
- func RedirectNativeLogger()
- func SetLevel(level int)
- func SetOutput(out io.Writer)
- func Trace(args ...interface{})
- func Tracef(format string, args ...interface{})
- func Warn(args ...interface{})
- func Warnf(format string, args ...interface{})
- type Logger
- func (l *Logger) Debug(args ...interface{})
- func (l *Logger) Debugf(format string, args ...interface{})
- func (l *Logger) Error(args ...interface{})
- func (l *Logger) Errorf(format string, args ...interface{})
- func (l *Logger) Fatal(args ...interface{})
- func (l *Logger) Fatalf(format string, args ...interface{})
- func (l *Logger) Info(args ...interface{})
- func (l *Logger) Infof(format string, args ...interface{})
- func (l *Logger) RedirectNativeLogger()
- func (l *Logger) SetLevel(level int)
- func (l *Logger) SetOutput(out io.Writer)
- func (l *Logger) Trace(args ...interface{})
- func (l *Logger) Tracef(format string, args ...interface{})
- func (l *Logger) Warn(args ...interface{})
- func (l *Logger) Warnf(format string, args ...interface{})
- func (l *Logger) Write(p []byte) (n int, err error)
Constants ¶
const ( // These flags define the different levels available for the logger LevelTrace = iota LevelDebug LevelInfo LevelWarn LevelError LevelFatal // Same as time.RFC3339Nano but with trailing 0 for seconds decimals PaddedRFC3339Nano = "2006-01-02T15:04:05.000000000Z07:00" )
Variables ¶
This section is empty.
Functions ¶
func RedirectNativeLogger ¶
func RedirectNativeLogger()
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
A Logger represents an active logging object that generates lines of output to an io.Writer.
func NewLogger ¶
NewLogger creates a new Logger. The level variable sets the minimum log level to output Default output is os.Stderr
func (*Logger) Debug ¶
func (l *Logger) Debug(args ...interface{})
Debug logs with Debug severity. Arguments are handled in the manner of fmt.Sprint
func (*Logger) Debugf ¶
Debug logs with Debug severity. Arguments are handled in the manner of fmt.Sprintf
func (*Logger) Error ¶
func (l *Logger) Error(args ...interface{})
Error logs with Error severity. Arguments are handled in the manner of fmt.Sprint
func (*Logger) Errorf ¶
Error logs with Error severity. Arguments are handled in the manner of fmt.Sprintf
func (*Logger) Fatal ¶
func (l *Logger) Fatal(args ...interface{})
Fatal logs with Fatal severity and follows with an os.Exit(1) Arguments are handled in the manner of fmt.Sprint
func (*Logger) Fatalf ¶
Fatal logs with Fatal severity and follows with an os.Exit(1) Arguments are handled in the manner of fmt.Sprintf
func (*Logger) Info ¶
func (l *Logger) Info(args ...interface{})
Info logs with Info severity. Arguments are handled in the manner of fmt.Sprint
func (*Logger) Infof ¶
Info logs with Info severity. Arguments are handled in the manner of fmt.Sprintf
func (*Logger) RedirectNativeLogger ¶
func (l *Logger) RedirectNativeLogger()
RedirectNativeLogger forces the native go logger to write in this instance and format accordingly
func (*Logger) Trace ¶
func (l *Logger) Trace(args ...interface{})
Trace logs with Trace severity. Arguments are handled in the manner of fmt.Sprint
func (*Logger) Tracef ¶
Tracef logs with Trace severity. Arguments are handled in the manner of fmt.Sprintf
func (*Logger) Warn ¶
func (l *Logger) Warn(args ...interface{})
Warn logs with Warn severity. Arguments are handled in the manner of fmt.Sprint