Documentation ¶
Index ¶
- Variables
- func Debug(message interface{}, params ...interface{})
- func DebugContext(ctx context.Context, message interface{}, params ...interface{})
- func Error(message interface{}, params ...interface{})
- func ErrorContext(ctx context.Context, message interface{}, params ...interface{})
- func Fatal(message interface{}, params ...interface{})
- func FatalContext(ctx context.Context, message interface{}, params ...interface{})
- func Info(message interface{}, params ...interface{})
- func InfoContext(ctx context.Context, message interface{}, params ...interface{})
- func Trace(message interface{}, params ...interface{})
- func TraceContext(ctx context.Context, message interface{}, params ...interface{})
- func Warn(message interface{}, params ...interface{})
- func WarnContext(ctx context.Context, message interface{}, params ...interface{})
- func WithPrefix(p string, message interface{}) string
- type Level
- type Log
- type Logger
- type Option
- type PrefixedLogger
- type SimpleLogger
Constants ¶
This section is empty.
Variables ¶
View Source
var Constructor = NewLog(FileDepth(2))
View Source
var PrefixedStdLogger = Constructor.PrefixedLog(FileDepth(3))
View Source
var StdLogger = Constructor.Log(FileDepth(3))
Functions ¶
func DebugContext ¶
func ErrorContext ¶
func FatalContext ¶
func InfoContext ¶
func TraceContext ¶
func WarnContext ¶
func WithPrefix ¶
Types ¶
type Log ¶
type Log interface { Log(...Option) Logger SimpleLog() SimpleLogger PrefixedLog(...Option) PrefixedLogger }
type Logger ¶
type Logger interface { Fatal(message interface{}, params ...interface{}) Error(message interface{}, params ...interface{}) Warn(message interface{}, params ...interface{}) Debug(message interface{}, params ...interface{}) Info(message interface{}, params ...interface{}) Trace(message interface{}, params ...interface{}) FatalContext(ctx context.Context, message interface{}, params ...interface{}) ErrorContext(ctx context.Context, message interface{}, params ...interface{}) WarnContext(ctx context.Context, message interface{}, params ...interface{}) DebugContext(ctx context.Context, message interface{}, params ...interface{}) InfoContext(ctx context.Context, message interface{}, params ...interface{}) TraceContext(ctx context.Context, message interface{}, params ...interface{}) SimpleLogger NewLog(...Option) Logger NewPrefixedLog(opts ...Option) PrefixedLogger }
func NewNoopLogger ¶
func NewNoopLogger() Logger
type PrefixedLogger ¶
type PrefixedLogger interface { Fatal(prefix string, message interface{}, params ...interface{}) Error(prefix string, message interface{}, params ...interface{}) Warn(prefix string, message interface{}, params ...interface{}) Debug(prefix string, message interface{}, params ...interface{}) Info(prefix string, message interface{}, params ...interface{}) Trace(prefix string, message interface{}, params ...interface{}) FatalContext(ctx context.Context, prefix string, message interface{}, params ...interface{}) ErrorContext(ctx context.Context, prefix string, message interface{}, params ...interface{}) WarnContext(ctx context.Context, prefix string, message interface{}, params ...interface{}) DebugContext(ctx context.Context, prefix string, message interface{}, params ...interface{}) InfoContext(ctx context.Context, prefix string, message interface{}, params ...interface{}) TraceContext(ctx context.Context, prefix string, message interface{}, params ...interface{}) NewLog(...Option) Logger NewPrefixedLog(opts ...Option) PrefixedLogger SimpleLogger }
func NewPrefixedNoopLogger ¶
func NewPrefixedNoopLogger() PrefixedLogger
type SimpleLogger ¶
type SimpleLogger interface { Print(v ...interface{}) Printf(format string, v ...interface{}) Println(v ...interface{}) }
Click to show internal directories.
Click to hide internal directories.