Documentation ¶
Index ¶
- Variables
- func GlobalDebugLevel() zapcore.Level
- func RandomStr(chars string, length int) string
- func ReConvert(ptn string) string
- func SetGlobalDebugLevel(lvl string)
- func StrIndex(vs []string, t string) int
- func StrSlice2DCopy(src [][]string) (cpy [][]string)
- func XMLStr(maxDepth int, maxElements int, seed []string) (string, error)
- type Logger
Constants ¶
This section is empty.
Variables ¶
View Source
var LevelsDbg = map[string]zapcore.Level{ "debug": zap.DebugLevel, "info": zap.InfoLevel, "warning": zap.WarnLevel, "error": zap.ErrorLevel, }
LevelsDbg is a reversed map of level macros and strings.
Functions ¶
func GlobalDebugLevel ¶
func ReConvert ¶
ReConvert does the pre-process of the regular expression literal. It does the following things: 1. Remove P before captured group names 2. Add parenthesises to the other parts of the log event string.
func SetGlobalDebugLevel ¶
func SetGlobalDebugLevel(lvl string)
func StrSlice2DCopy ¶
StrSlice2DCopy is a simple helper function to make a deep copy of a 2-dimensional string slice.
Types ¶
type Logger ¶
type Logger = zap.SugaredLogger
func GetSugaredLogger ¶
func GetSugaredLogger() *Logger
Click to show internal directories.
Click to hide internal directories.