Documentation
¶
Overview ¶
Package log is the legacy logging package.
Deprecated: use github.com/imdm/go-util/logging instead. New code should not import this package.
Index ¶
- func Debug(args ...interface{})deprecated
- func Debugf(format string, args ...interface{})deprecated
- func Debugw(msg string, kvs ...interface{})deprecated
- func Error(args ...interface{})deprecated
- func Errorf(format string, args ...interface{})deprecated
- func Errorw(msg string, kvs ...interface{})deprecated
- func Fatal(args ...interface{})deprecated
- func Fatalf(format string, args ...interface{})deprecated
- func Fatalw(msg string, kvs ...interface{})deprecated
- func Info(args ...interface{})deprecated
- func Infof(format string, args ...interface{})deprecated
- func Infow(msg string, kvs ...interface{})deprecated
- func Panic(args ...interface{})deprecated
- func Panicf(format string, args ...interface{})deprecated
- func Panicw(msg string, kvs ...interface{})deprecated
- func SetDefault(l *Logger)deprecated
- func Warn(args ...interface{})deprecated
- func Warnf(format string, args ...interface{})deprecated
- func Warnw(msg string, kvs ...interface{})deprecated
- type Loggerdeprecated
- func Default() *Loggerdeprecated
- func New(options ...Option) *Loggerdeprecated
- type Optiondeprecated
- func WithConsoleLog(b bool) Optiondeprecated
- func WithFileLog(b bool) Optiondeprecated
- func WithFilePath(p string) Optiondeprecated
- func WithLevel(lvl string) Optiondeprecated
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debug
deprecated
func Debug(args ...interface{})
Debug prints a debug-level log by default logger instance.
Deprecated: use github.com/imdm/go-util/logging.Logger.Debug instead.
func Error
deprecated
func Error(args ...interface{})
Error prints a error-level log by default logger instance.
Deprecated: use github.com/imdm/go-util/logging.Logger.Error instead.
func Fatal
deprecated
func Fatal(args ...interface{})
Fatal prints a fatal-level log by default logger instance.
Deprecated: use github.com/imdm/go-util/logging.Logger.Fatal instead.
func Info
deprecated
func Info(args ...interface{})
Info prints a info-level log by default logger instance.
Deprecated: use github.com/imdm/go-util/logging.Logger.Info instead.
func Panic
deprecated
func Panic(args ...interface{})
Panic prints a panic-level log by default logger instance.
Deprecated: use github.com/imdm/go-util/logging.Logger.Error plus panic handling instead.
func SetDefault
deprecated
func SetDefault(l *Logger)
SetDefault sets the default logger instance.
Deprecated: use github.com/imdm/go-util/logging.SetDefaultLogger instead.
func Warn
deprecated
func Warn(args ...interface{})
Warn prints a warn-level log by default logger instance.
Deprecated: use github.com/imdm/go-util/logging.Logger.Warn instead.
Types ¶
type Logger
deprecated
type Logger struct {
*zap.SugaredLogger
// contains filtered or unexported fields
}
Logger wraps zap.SugaredLogger with two output cores: a rotate file and color console. It also registers a custom metrics collection hook.
Deprecated: use github.com/imdm/go-util/logging.Logger instead.
type Option
deprecated
type Option func(*Logger)
Option configures a logger.
Deprecated: use github.com/imdm/go-util/logging.Config instead.