Documentation
¶
Overview ¶
Custom Writer use SetOutput Custom Level use SetLogLevel handle log fatal use SetCancel
Index ¶
- func Debug(v ...interface{})
- func Debugf(format string, v ...interface{})
- func Error(v ...interface{})
- func Errorf(format string, v ...interface{})
- func Fatal(v ...interface{})
- func Fatalf(format string, v ...interface{})
- func Format(reqId string, moduleName string, v ...interface{}) ([]byte, error)
- func Info(v ...interface{})
- func Infof(format string, v ...interface{})
- func New(level Level, out, errOut *log.Logger) *loggerIns
- func SetCancel(fn context.CancelFunc)
- func SetLogLevel(level Level)
- func SetName(n string)
- func SetOutput(out, err *log.Logger)
- func Stats(v ...interface{})
- func Statsf(format string, v ...interface{})
- func Warning(v ...interface{})
- func Warningf(format string, v ...interface{})
- func WrapIris(app *iris.Application, projectName string)
- type Formatter
- type Level
- type Logger
- type UniversalLog
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debugf ¶
func Debugf(format string, v ...interface{})
Debugf is equivalent to Printf() for DEBUG-level log.
func Errorf ¶
func Errorf(format string, v ...interface{})
Errorf is equivalent to Printf() for Error-level log.
func Fatalf ¶
func Fatalf(format string, v ...interface{})
Fatalf is equivalent to Printf() for FATAL-level log.
func Infof ¶
func Infof(format string, v ...interface{})
Infof is equivalent to Printf() for Info-level log.
func SetCancel ¶
func SetCancel(fn context.CancelFunc)
When Log write failed, it will call cancel. context.Context should be Done. others goroutine should finish their jobs and exit safety.
func SetLogLevel ¶
func SetLogLevel(level Level)
func Stats ¶ added in v1.1.1
func Stats(v ...interface{})
Fatalf is equivalent to Printf() for FATAL-level log.
func Statsf ¶ added in v1.1.1
func Statsf(format string, v ...interface{})
Fatalf is equivalent to Printf() for FATAL-level log.
Types ¶
type Logger ¶ added in v1.0.0
type Logger interface { Statsf(format string, v ...interface{}) Stats(v ...interface{}) Fatalf(format string, v ...interface{}) // Fatal is equivalent to Print() for FATAL-level log. Fatal(v ...interface{}) // Errorf is equivalent to Printf() for Error-level log. Errorf(format string, v ...interface{}) // Error is equivalent to Print() for Error-level log. Error(v ...interface{}) // Warningf is equivalent to Printf() for WARNING-level log. Warningf(format string, v ...interface{}) // Waring is equivalent to Print() for WARING-level log. Warning(v ...interface{}) // Infof is equivalent to Printf() for Info-level log. Infof(format string, v ...interface{}) // Info is equivalent to Print() for Info-level log. Info(v ...interface{}) // Debugf is equivalent to Printf() for DEBUG-level log. Debugf(format string, v ...interface{}) // Debug is equivalent to Print() for DEBUG-level log. Debug(v ...interface{}) }
type UniversalLog ¶ added in v1.0.0
Click to show internal directories.
Click to hide internal directories.