Documentation ¶
Index ¶
- Variables
- func EnableDebug()
- func EnableError()
- func EnableInfo()
- func EnableWarning()
- func GetClient(proxyUrl string, timeout int) (*http.Client, error)
- func GetLogger() *log.Logger
- func GetResponse(proxyUrl string, requestUrl string) (*http.Response, error)
- func GetResponseDump(proxyUrl string, requestUrl string) ([]byte, error)
- func Init()
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Atom = zap.NewAtomicLevel() Sugar *zap.SugaredLogger )
View Source
var DefaultLogFormatter = func(param gin.LogFormatterParams) string { var methodColor, resetColor string methodColor = param.MethodColor() resetColor = param.ResetColor() if param.Latency > time.Minute { param.Latency = param.Latency - param.Latency%time.Second } return fmt.Sprintf("GIN: %s %-7s %s| %13v | %15s | %s\n%s", methodColor, param.Method, resetColor, param.Latency, param.Request.URL.Host, param.Path, param.ErrorMessage, ) }
defaultLogFormatter is the default log format function Logger middleware uses.
Functions ¶
func EnableDebug ¶ added in v1.7.0
func EnableDebug()
func EnableError ¶ added in v1.7.0
func EnableError()
func EnableInfo ¶ added in v1.7.0
func EnableInfo()
func EnableWarning ¶ added in v1.7.0
func EnableWarning()
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.