Documentation ¶
Index ¶
- Variables
- func CyanColor(str interface{}) string
- func GreenColor(str interface{}) string
- func InitZap(opts ...OptionFunc)
- func Log(level zapcore.Level, message string, context string, scope string)
- func LogE(message string)
- func LogEf(format string, i ...interface{})
- func LogGreen(str string)
- func LogI(message string)
- func LogIf(format string, i ...interface{})
- func LogIfError(err error)
- func LogPanicIfError(err error)
- func LogRed(str string)
- func LogWithDefer(str string) (deferFunc func())
- func LogWithField(level zapcore.Level, fields map[string]interface{})
- func LogYellow(str string)
- func RedColor(str interface{}) string
- func SetMaskLog(masker Masker)
- func YellowColor(str interface{}) string
- type Masker
- type Option
- type OptionFunc
- type PatternType
Constants ¶
This section is empty.
Variables ¶
View Source
var MaskLog = func(text string) string {
return text
}
MaskLog func for mask sensitive information from log
Functions ¶
func LogPanicIfError ¶ added in v1.11.26
func LogPanicIfError(err error)
LogPanicIfError log if error not nil
func LogWithDefer ¶
func LogWithDefer(str string) (deferFunc func())
LogWithDefer return defer func for status
func LogWithField ¶ added in v1.9.3
LogWithField func
Types ¶
type OptionFunc ¶ added in v1.9.3
type OptionFunc func(*Option)
OptionFunc func
func OptionAddWriter ¶ added in v1.9.3
func OptionAddWriter(w io.Writer) OptionFunc
OptionAddWriter option func
func OptionSetWriter ¶ added in v1.12.2
func OptionSetWriter(w ...io.Writer) OptionFunc
OptionSetWriter option func, overide all log writer
type PatternType ¶ added in v1.17.0
type PatternType struct {
// contains filtered or unexported fields
}
func GeneratePatternType ¶ added in v1.17.0
func GeneratePatternType(keyword string) (patterns []PatternType)
GeneratePatternType generate default patter type
func (*PatternType) ContainsInEnds ¶ added in v1.17.0
func (p *PatternType) ContainsInEnds(c rune) bool
Click to show internal directories.
Click to hide internal directories.