- update log

master
李光春 8 months ago
parent 315d1a7c0b
commit 32895c815d

@ -17,7 +17,6 @@ require (
github.com/json-iterator/go v1.1.12
github.com/mitchellh/mapstructure v1.5.0
github.com/mvdan/xurls v1.1.0
github.com/natefinch/lumberjack v2.0.0+incompatible
github.com/oschwald/geoip2-golang v1.9.0
github.com/qiniu/go-sdk/v7 v7.17.1
github.com/redis/go-redis/v9 v9.1.0
@ -29,9 +28,9 @@ require (
go.mongodb.org/mongo-driver v1.12.1
go.uber.org/zap v1.25.0
golang.org/x/crypto v0.12.0
golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63
golang.org/x/text v0.13.0
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
gopkg.in/natefinch/lumberjack.v2 v2.2.1
gorm.io/datatypes v1.2.0
gorm.io/driver/mysql v1.5.1
gorm.io/driver/postgres v1.5.2
@ -40,7 +39,6 @@ require (
)
require (
github.com/BurntSushi/toml v1.2.0 // indirect
github.com/bitly/go-simplejson v0.5.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect
@ -93,8 +91,6 @@ require (
golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
gorm.io/hints v1.1.2 // indirect
gorm.io/plugin/dbresolver v1.4.7 // indirect

@ -1,5 +1,3 @@
github.com/BurntSushi/toml v1.2.0 h1:Rt8g24XnyGTyglgET/PRUNlrUeu9F5L+7FilkXfZgs0=
github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/MercuryEngineering/CookieMonster v0.0.0-20180304172713-1584578b3403 h1:EtZwYyLbkEcIt+B//6sujwRCnHuTEK3qiSypAX5aJeM=
github.com/MercuryEngineering/CookieMonster v0.0.0-20180304172713-1584578b3403/go.mod h1:mM6WvakkX2m+NgMiPCfFFjwfH4KzENC07zeGEqq9U7s=
github.com/QcloudApi/qcloud_sign_golang v0.0.0-20141224014652-e4130a326409/go.mod h1:1pk82RBxDY/JZnPQrtqHlUFfCctgdorsd9M06fMynOM=
@ -134,8 +132,6 @@ github.com/mozillazg/go-httpheader v0.4.0 h1:aBn6aRXtFzyDLZ4VIRLsZbbJloagQfMnCiY
github.com/mozillazg/go-httpheader v0.4.0/go.mod h1:PuT8h0pw6efvp8ZeUec1Rs7dwjK08bt6gKSReGMqtdA=
github.com/mvdan/xurls v1.1.0 h1:OpuDelGQ1R1ueQ6sSryzi6P+1RtBpfQHM8fJwlE45ww=
github.com/mvdan/xurls v1.1.0/go.mod h1:tQlNn3BED8bE/15hnSL2HLkDeLWpNPAwtw7wkEq44oU=
github.com/natefinch/lumberjack v2.0.0+incompatible h1:4QJd3OLAMgj7ph+yZTuX13Ld4UpgHp07nNdFX7mqFfM=
github.com/natefinch/lumberjack v2.0.0+incompatible/go.mod h1:Wi9p2TTF5DG5oU+6YfsmYQpsTIOm0B1VNzQg9Mw6nPk=
github.com/oschwald/geoip2-golang v1.9.0 h1:uvD3O6fXAXs+usU+UGExshpdP13GAqp4GBrzN7IgKZc=
github.com/oschwald/geoip2-golang v1.9.0/go.mod h1:BHK6TvDyATVQhKNbQBdrj9eAvuwOMi2zSFXizL3K81Y=
github.com/oschwald/maxminddb-golang v1.12.0 h1:9FnTOD0YOhP7DGxGsq4glzpGy5+w7pq50AS6wALUMYs=
@ -223,8 +219,6 @@ golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0
golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw=
golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk=
golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw=
golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 h1:m64FZMko/V45gv0bNmrNYoDEq8U5YUhetc9cBWKS1TQ=
golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63/go.mod h1:0v4NqG35kSWCMzLaMeX+IQrlSnVE/bqGSyC2cz/9Le8=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
@ -292,10 +286,8 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EV
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df h1:n7WqCuqOuCbNr617RXOY0AWRXxgwEyPp2z+p0+hgMuE=
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkpBDuZnXENFzX8qRjMDMyPD6BRkCw=
gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8=
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc=
gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=

@ -1,5 +1,5 @@
package go_library
func Version() string {
return "1.0.161"
return "1.0.162"
}

@ -30,9 +30,9 @@ type Client struct {
alipayRSA2 string // 支付宝公钥
aes string // 接口内容加密方式
}
zap struct {
status bool // 状态
client *golog.ApiZapLog // 日志服务
slog struct {
status bool // 状态
client *golog.ApiSLog // 日志服务
}
}

@ -2,11 +2,11 @@ package alipayopen
import "github.com/dtapps/go-library/utils/golog"
// ConfigZapClientFun 日志配置
func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun) {
apiZapLog := apiZapLogFun()
if apiZapLog != nil {
c.zap.client = apiZapLog
c.zap.status = true
// ConfigSLogClientFun 日志配置
func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun) {
apiSLog := apiSLogFun()
if apiSLog != nil {
c.slog.client = apiSLog
c.slog.status = true
}
}

@ -27,8 +27,8 @@ func (c *Client) request(ctx context.Context, param map[string]interface{}) (gor
}
// 记录日志
if c.zap.status {
go c.zap.client.MiddlewareCustom(ctx, gostring.ToString(params["method"]), request)
if c.slog.status {
go c.slog.client.MiddlewareCustom(ctx, gostring.ToString(params["method"]), request)
}
return request, err

@ -16,9 +16,9 @@ type Client struct {
config struct {
key string
}
zap struct {
status bool // 状态
client *golog.ApiZapLog // 日志服务
slog struct {
status bool // 状态
client *golog.ApiSLog // 日志服务
}
}

@ -2,11 +2,11 @@ package amap
import "github.com/dtapps/go-library/utils/golog"
// ConfigZapClientFun 日志配置
func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun) {
apiZapLog := apiZapLogFun()
if apiZapLog != nil {
c.zap.client = apiZapLog
c.zap.status = true
// ConfigSLogClientFun 日志配置
func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun) {
apiSLog := apiSLogFun()
if apiSLog != nil {
c.slog.client = apiSLog
c.slog.status = true
}
}

@ -29,8 +29,8 @@ func (c *Client) request(ctx context.Context, url string, params map[string]inte
}
// 记录日志
if c.zap.status {
go c.zap.client.Middleware(ctx, request)
if c.slog.status {
go c.slog.client.Middleware(ctx, request)
}
return request, err

@ -14,9 +14,9 @@ type Client struct {
config struct {
ak string
}
zap struct {
status bool // 状态
client *golog.ApiZapLog // 日志服务
slog struct {
status bool // 状态
client *golog.ApiSLog // 日志服务
}
}

@ -2,11 +2,11 @@ package baidu
import "github.com/dtapps/go-library/utils/golog"
// ConfigZapClientFun 日志配置
func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun) {
apiZapLog := apiZapLogFun()
if apiZapLog != nil {
c.zap.client = apiZapLog
c.zap.status = true
// ConfigSLogClientFun 日志配置
func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun) {
apiSLog := apiSLogFun()
if apiSLog != nil {
c.slog.client = apiSLog
c.slog.status = true
}
}

@ -29,8 +29,8 @@ func (c *Client) request(ctx context.Context, url string, params map[string]inte
}
// 记录日志
if c.zap.status {
go c.zap.client.Middleware(ctx, request)
if c.slog.status {
go c.slog.client.Middleware(ctx, request)
}
return request, err

@ -16,9 +16,9 @@ type Client struct {
config struct {
token string
}
zap struct {
status bool // 状态
client *golog.ApiZapLog // 日志服务
slog struct {
status bool // 状态
client *golog.ApiSLog // 日志服务
}
}

@ -2,11 +2,11 @@ package caiyunapp
import "github.com/dtapps/go-library/utils/golog"
// ConfigZapClientFun 日志配置
func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun) {
apiZapLog := apiZapLogFun()
if apiZapLog != nil {
c.zap.client = apiZapLog
c.zap.status = true
// ConfigSLogClientFun 日志配置
func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun) {
apiSLog := apiSLogFun()
if apiSLog != nil {
c.slog.client = apiSLog
c.slog.status = true
}
}

@ -29,8 +29,8 @@ func (c *Client) request(ctx context.Context, url string, params map[string]inte
}
// 记录日志
if c.zap.status {
go c.zap.client.Middleware(ctx, request)
if c.slog.status {
go c.slog.client.Middleware(ctx, request)
}
return request, err

@ -16,9 +16,9 @@ type Client struct {
config struct {
apiKey string // 密钥
}
zap struct {
status bool // 状态
client *golog.ApiZapLog // 日志服务
slog struct {
status bool // 状态
client *golog.ApiSLog // 日志服务
}
}

@ -2,11 +2,11 @@ package dingdanxia
import "github.com/dtapps/go-library/utils/golog"
// ConfigZapClientFun 日志配置
func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun) {
apiZapLog := apiZapLogFun()
if apiZapLog != nil {
c.zap.client = apiZapLog
c.zap.status = true
// ConfigSLogClientFun 日志配置
func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun) {
apiSLog := apiSLogFun()
if apiSLog != nil {
c.slog.client = apiSLog
c.slog.status = true
}
}

@ -33,8 +33,8 @@ func (c *Client) request(ctx context.Context, url string, params map[string]inte
}
// 记录日志
if c.zap.status {
go c.zap.client.Middleware(ctx, request)
if c.slog.status {
go c.slog.client.Middleware(ctx, request)
}
return request, err

@ -18,9 +18,9 @@ type Client struct {
secret string
accessToken string
}
zap struct {
status bool // 状态
client *golog.ApiZapLog // 日志服务
slog struct {
status bool // 状态
client *golog.ApiSLog // 日志服务
}
}

@ -8,11 +8,11 @@ func (c *Client) Config(secret, accessToken string) *Client {
return c
}
// ConfigZapClientFun 日志配置
func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun) {
apiZapLog := apiZapLogFun()
if apiZapLog != nil {
c.zap.client = apiZapLog
c.zap.status = true
// ConfigSLogClientFun 日志配置
func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun) {
apiSLog := apiSLogFun()
if apiSLog != nil {
c.slog.client = apiSLog
c.slog.status = true
}
}

@ -29,8 +29,8 @@ func (c *Client) request(ctx context.Context, url string, params map[string]inte
}
// 记录日志
if c.zap.status {
go c.zap.client.Middleware(ctx, request)
if c.slog.status {
go c.slog.client.Middleware(ctx, request)
}
return request, err

@ -14,9 +14,9 @@ type Client struct {
config struct {
ua string // 用户代理
}
zap struct {
status bool // 状态
client *golog.ApiZapLog // 日志服务
slog struct {
status bool // 状态
client *golog.ApiSLog // 日志服务
}
}

@ -2,11 +2,11 @@ package douyin
import "github.com/dtapps/go-library/utils/golog"
// ConfigZapClientFun 日志配置
func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun) {
apiZapLog := apiZapLogFun()
if apiZapLog != nil {
c.zap.client = apiZapLog
c.zap.status = true
// ConfigSLogClientFun 日志配置
func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun) {
apiSLog := apiSLogFun()
if apiSLog != nil {
c.slog.client = apiSLog
c.slog.status = true
}
}

@ -32,8 +32,8 @@ func (c *Client) request(ctx context.Context, url string, params map[string]inte
}
// 记录日志
if c.zap.status {
go c.zap.client.Middleware(ctx, request)
if c.slog.status {
go c.slog.client.Middleware(ctx, request)
}
return request, err

@ -18,9 +18,9 @@ type Client struct {
appId string
apiKey string
}
zap struct {
status bool // 状态
client *golog.ApiZapLog // 日志服务
slog struct {
status bool // 状态
client *golog.ApiSLog // 日志服务
}
}

@ -2,11 +2,11 @@ package eastiot
import "github.com/dtapps/go-library/utils/golog"
// ConfigZapClientFun 日志配置
func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun) {
apiZapLog := apiZapLogFun()
if apiZapLog != nil {
c.zap.client = apiZapLog
c.zap.status = true
// ConfigSLogClientFun 日志配置
func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun) {
apiSLog := apiSLogFun()
if apiSLog != nil {
c.slog.client = apiSLog
c.slog.status = true
}
}

@ -37,8 +37,8 @@ func (c *Client) request(ctx context.Context, url string, params map[string]inte
}
// 记录日志
if c.zap.status {
go c.zap.client.Middleware(ctx, request)
if c.slog.status {
go c.slog.client.Middleware(ctx, request)
}
return request, err

@ -21,9 +21,9 @@ type Client struct {
key string
signStr string // 需要签名的字符串
}
zap struct {
status bool // 状态
client *golog.ApiZapLog // 日志服务
slog struct {
status bool // 状态
client *golog.ApiSLog // 日志服务
}
}

@ -2,11 +2,11 @@ package ejiaofei
import "github.com/dtapps/go-library/utils/golog"
// ConfigZapClientFun 日志配置
func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun) {
apiZapLog := apiZapLogFun()
if apiZapLog != nil {
c.zap.client = apiZapLog
c.zap.status = true
// ConfigSLogClientFun 日志配置
func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun) {
apiSLog := apiSLogFun()
if apiSLog != nil {
c.slog.client = apiSLog
c.slog.status = true
}
}

@ -38,8 +38,8 @@ func (c *Client) request(ctx context.Context, url string, params map[string]inte
}
// 记录日志
if c.zap.status {
go c.zap.client.MiddlewareXml(ctx, request)
if c.slog.status {
go c.slog.client.MiddlewareXml(ctx, request)
}
return request, err

@ -16,9 +16,9 @@ type Client struct {
config struct {
key string
}
zap struct {
status bool // 状态
client *golog.ApiZapLog // 日志服务
slog struct {
status bool // 状态
client *golog.ApiSLog // 日志服务
}
}

@ -7,11 +7,11 @@ func (c *Client) Config(key string) *Client {
return c
}
// ConfigZapClientFun 日志配置
func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun) {
apiZapLog := apiZapLogFun()
if apiZapLog != nil {
c.zap.client = apiZapLog
c.zap.status = true
// ConfigSLogClientFun 日志配置
func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun) {
apiSLog := apiSLogFun()
if apiSLog != nil {
c.slog.client = apiSLog
c.slog.status = true
}
}

@ -26,8 +26,8 @@ func (c *Client) request(ctx context.Context, url string, params map[string]inte
}
// 记录日志
if c.zap.status {
go c.zap.client.Middleware(ctx, request)
if c.slog.status {
go c.slog.client.Middleware(ctx, request)
}
return request, err

@ -22,9 +22,9 @@ type Client struct {
siteId string // 网站ID/APP ID
positionId string // 推广位id
}
zap struct {
status bool // 状态
client *golog.ApiZapLog // 日志服务
slog struct {
status bool // 状态
client *golog.ApiSLog // 日志服务
}
}

@ -2,11 +2,11 @@ package jd
import "github.com/dtapps/go-library/utils/golog"
// ConfigZapClientFun 日志配置
func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun) {
apiZapLog := apiZapLogFun()
if apiZapLog != nil {
c.zap.client = apiZapLog
c.zap.status = true
// ConfigSLogClientFun 日志配置
func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun) {
apiSLog := apiSLogFun()
if apiSLog != nil {
c.slog.client = apiSLog
c.slog.status = true
}
}

@ -28,8 +28,8 @@ func (c *Client) request(ctx context.Context, params map[string]interface{}) (go
}
// 记录日志
if c.zap.status {
go c.zap.client.MiddlewareCustom(ctx, fmt.Sprintf("%s", params["method"]), request)
if c.slog.status {
go c.slog.client.MiddlewareCustom(ctx, fmt.Sprintf("%s", params["method"]), request)
}
return request, err

@ -19,13 +19,13 @@ type Client struct {
customerId int64 // 商家编号
customerKey string // 商家密钥
}
zap struct {
status bool // 状态
client *golog.ApiZapLog // 日志服务
slog struct {
status bool // 状态
client *golog.ApiSLog // 日志服务
}
cacheZap struct {
status bool // 状态
client *golog.ApiZapLog // 日志服务
cacheSlog struct {
status bool // 状态
client *golog.ApiSLog // 日志服务
}
}
@ -37,7 +37,7 @@ func NewClient(config *ClientConfig) (*Client, error) {
c.config.customerId = config.CustomerId
c.config.customerKey = config.CustomerKey
c.cacheZap.status = config.CacheLogStatus
c.cacheSlog.status = config.CacheLogStatus
c.requestClient = gorequest.NewHttp()

@ -2,13 +2,13 @@ package kashangwl
import "github.com/dtapps/go-library/utils/golog"
// ConfigZapClientFun 日志配置
func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun) {
apiZapLog := apiZapLogFun()
if apiZapLog != nil {
c.zap.client = apiZapLog
c.zap.status = true
// ConfigSLogClientFun 日志配置
func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun) {
apiSLog := apiSLogFun()
if apiSLog != nil {
c.slog.client = apiSLog
c.slog.status = true
c.cacheZap.client = apiZapLog
c.cacheSlog.client = apiSLog
}
}

@ -37,8 +37,8 @@ func (c *Client) request(ctx context.Context, url string, params map[string]inte
}
// 日志
if c.zap.status {
go c.zap.client.Middleware(ctx, request)
if c.slog.status {
go c.slog.client.Middleware(ctx, request)
}
return request, err
@ -71,8 +71,8 @@ func (c *Client) requestCache(ctx context.Context, url string, params map[string
}
// 日志
if c.cacheZap.status {
go c.cacheZap.client.Middleware(ctx, request)
if c.cacheSlog.status {
go c.cacheSlog.client.Middleware(ctx, request)
}
return request, err

@ -18,9 +18,9 @@ type Client struct {
customer string // 授权码
key string // 密钥
}
zap struct {
status bool // 状态
client *golog.ApiZapLog // 日志服务
slog struct {
status bool // 状态
client *golog.ApiSLog // 日志服务
}
}

@ -7,11 +7,11 @@ func (c *Client) Config(customer string) *Client {
return c
}
// ConfigZapClientFun 日志配置
func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun) {
apiZapLog := apiZapLogFun()
if apiZapLog != nil {
c.zap.client = apiZapLog
c.zap.status = true
// ConfigSLogClientFun 日志配置
func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun) {
apiSLog := apiSLogFun()
if apiSLog != nil {
c.slog.client = apiSLog
c.slog.status = true
}
}

@ -41,8 +41,8 @@ func (c *Client) request(ctx context.Context, url string, params map[string]inte
}
// 记录日志
if c.zap.status {
go c.zap.client.Middleware(ctx, request)
if c.slog.status {
go c.slog.client.Middleware(ctx, request)
}
return request, err

@ -15,9 +15,9 @@ type Client struct {
config struct {
ua string // 用户代理
}
zap struct {
status bool // 状态
client *golog.ApiZapLog // 日志服务
slog struct {
status bool // 状态
client *golog.ApiSLog // 日志服务
}
}

@ -2,11 +2,11 @@ package kuaishou
import "github.com/dtapps/go-library/utils/golog"
// ConfigZapClientFun 日志配置
func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun) {
apiZapLog := apiZapLogFun()
if apiZapLog != nil {
c.zap.client = apiZapLog
c.zap.status = true
// ConfigSLogClientFun 日志配置
func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun) {
apiSLog := apiSLogFun()
if apiSLog != nil {
c.slog.client = apiSLog
c.slog.status = true
}
}

@ -19,9 +19,9 @@ type Client struct {
environment string // 环境
keyAgent string
}
zap struct {
status bool // 状态
client *golog.ApiZapLog // 日志服务
slog struct {
status bool // 状态
client *golog.ApiSLog // 日志服务
}
}

@ -2,11 +2,11 @@ package leshuazf
import "github.com/dtapps/go-library/utils/golog"
// ConfigZapClientFun 日志配置
func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun) {
apiZapLog := apiZapLogFun()
if apiZapLog != nil {
c.zap.client = apiZapLog
c.zap.status = true
// ConfigSLogClientFun 日志配置
func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun) {
apiSLog := apiSLogFun()
if apiSLog != nil {
c.slog.client = apiSLog
c.slog.status = true
}
}

@ -44,8 +44,8 @@ func (c *Client) request(ctx context.Context, url string, params map[string]inte
}
// 日志
if c.zap.status {
go c.zap.client.Middleware(ctx, request)
if c.slog.status {
go c.slog.client.Middleware(ctx, request)
}
return request, err

@ -18,9 +18,9 @@ type Client struct {
secret string // 秘钥
appKey string // 渠道标记
}
zap struct {
status bool // 状态
client *golog.ApiZapLog // 日志服务
slog struct {
status bool // 状态
client *golog.ApiSLog // 日志服务
}
}

@ -2,11 +2,11 @@ package meituan
import "github.com/dtapps/go-library/utils/golog"
// ConfigZapClientFun 日志配置
func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun) {
apiZapLog := apiZapLogFun()
if apiZapLog != nil {
c.zap.client = apiZapLog
c.zap.status = true
// ConfigSLogClientFun 日志配置
func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun) {
apiSLog := apiSLogFun()
if apiSLog != nil {
c.slog.client = apiSLog
c.slog.status = true
}
}

@ -29,8 +29,8 @@ func (c *Client) request(ctx context.Context, url string, params map[string]inte
}
// 日志
if c.zap.status {
go c.zap.client.Middleware(ctx, request)
if c.slog.status {
go c.slog.client.Middleware(ctx, request)
}
return request, err

@ -16,8 +16,8 @@ type Client struct {
config struct {
vendor string
}
zap struct {
status bool // 状态
client *golog.ApiZapLog // 日志服务
slog struct {
status bool // 状态
client *golog.ApiSLog // 日志服务
}
}

@ -2,11 +2,11 @@ package nldyp
import "github.com/dtapps/go-library/utils/golog"
// ConfigZapClientFun 日志配置
func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun) {
apiZapLog := apiZapLogFun()
if apiZapLog != nil {
c.zap.client = apiZapLog
c.zap.status = true
// ConfigSLogClientFun 日志配置
func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun) {
apiSLog := apiSLogFun()
if apiSLog != nil {
c.slog.client = apiSLog
c.slog.status = true
}
}

@ -29,8 +29,8 @@ func (c *Client) request(ctx context.Context, url string, param map[string]inter
}
// 日志
if c.zap.status {
go c.zap.client.Middleware(ctx, request)
if c.slog.status {
go c.slog.client.Middleware(ctx, request)
}
return request, err

@ -7,9 +7,9 @@ import (
type Client struct {
client *gorequest.App // 请求服务
zap struct {
status bool // 状态
client *golog.ApiZapLog // 日志服务
slog struct {
status bool // 状态
client *golog.ApiSLog // 日志服务
}
}

@ -2,11 +2,11 @@ package pconline
import "github.com/dtapps/go-library/utils/golog"
// ConfigZapClientFun 日志配置
func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun) {
apiZapLog := apiZapLogFun()
if apiZapLog != nil {
c.zap.client = apiZapLog
c.zap.status = true
// ConfigSLogClientFun 日志配置
func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun) {
apiSLog := apiSLogFun()
if apiSLog != nil {
c.slog.client = apiSLog
c.slog.status = true
}
}

@ -23,8 +23,8 @@ func (c *Client) request(ctx context.Context, url string, params map[string]inte
}
// 日志
if c.zap.status {
go c.zap.client.Middleware(ctx, request)
if c.slog.status {
go c.slog.client.Middleware(ctx, request)
}
return request, err

@ -24,9 +24,9 @@ type Client struct {
mediaId string // 媒体ID
pid string // 推广位
}
zap struct {
status bool // 状态
client *golog.ApiZapLog // 日志服务
slog struct {
status bool // 状态
client *golog.ApiSLog // 日志服务
}
}

@ -7,11 +7,11 @@ func (c *Client) ConfigPid(pid string) *Client {
return c
}
// ConfigZapClientFun 日志配置
func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun) {
apiZapLog := apiZapLogFun()
if apiZapLog != nil {
c.zap.client = apiZapLog
c.zap.status = true
// ConfigSLogClientFun 日志配置
func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun) {
apiSLog := apiSLogFun()
if apiSLog != nil {
c.slog.client = apiSLog
c.slog.status = true
}
}

@ -24,8 +24,8 @@ func (c *Client) request(ctx context.Context, params map[string]interface{}) (go
}
// 日志
if c.zap.status {
go c.zap.client.MiddlewareCustom(ctx, fmt.Sprintf("%s", params["type"]), request)
if c.slog.status {
go c.slog.client.MiddlewareCustom(ctx, fmt.Sprintf("%s", params["type"]), request)
}
return request, err

@ -20,9 +20,9 @@ type Client struct {
appKey string
appSecret string
}
zap struct {
status bool // 状态
client *golog.ApiZapLog // 日志服务
slog struct {
status bool // 状态
client *golog.ApiSLog // 日志服务
}
}

@ -2,11 +2,11 @@ package pintoto
import "github.com/dtapps/go-library/utils/golog"
// ConfigZapClientFun 日志配置
func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun) {
apiZapLog := apiZapLogFun()
if apiZapLog != nil {
c.zap.client = apiZapLog
c.zap.status = true
// ConfigSLogClientFun 日志配置
func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun) {
apiSLog := apiSLogFun()
if apiSLog != nil {
c.slog.client = apiSLog
c.slog.status = true
}
}

@ -35,8 +35,8 @@ func (c *Client) request(ctx context.Context, url string, params map[string]inte
}
// 记录日志
if c.zap.status {
go c.zap.client.Middleware(ctx, request)
if c.slog.status {
go c.slog.client.Middleware(ctx, request)
}
return request, err

@ -16,9 +16,9 @@ type Client struct {
config struct {
key string
}
zap struct {
status bool // 状态
client *golog.ApiZapLog // 日志服务
slog struct {
status bool // 状态
client *golog.ApiSLog // 日志服务
}
}

@ -2,11 +2,11 @@ package qq
import "github.com/dtapps/go-library/utils/golog"
// ConfigZapClientFun 日志配置
func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun) {
apiZapLog := apiZapLogFun()
if apiZapLog != nil {
c.zap.client = apiZapLog
c.zap.status = true
// ConfigSLogClientFun 日志配置
func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun) {
apiSLog := apiSLogFun()
if apiSLog != nil {
c.slog.client = apiSLog
c.slog.status = true
}
}

@ -29,8 +29,8 @@ func (c *Client) request(ctx context.Context, url string, params map[string]inte
}
// 记录日志
if c.zap.status {
go c.zap.client.Middleware(ctx, request)
if c.slog.status {
go c.slog.client.Middleware(ctx, request)
}
return request, err

@ -16,9 +16,9 @@ type Client struct {
apiUser string // API_USER
apiKey string // API_KEY
}
zap struct {
status bool // 状态
client *golog.ApiZapLog // 日志服务
slog struct {
status bool // 状态
client *golog.ApiSLog // 日志服务
}
}

@ -2,11 +2,11 @@ package sendcloud
import "github.com/dtapps/go-library/utils/golog"
// ConfigZapClientFun 日志配置
func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun) {
apiZapLog := apiZapLogFun()
if apiZapLog != nil {
c.zap.client = apiZapLog
c.zap.status = true
// ConfigSLogClientFun 日志配置
func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun) {
apiSLog := apiSLogFun()
if apiSLog != nil {
c.slog.client = apiSLog
c.slog.status = true
}
}

@ -34,8 +34,8 @@ func (c *Client) request(ctx context.Context, url string, params map[string]inte
}
// 日志
if c.zap.status {
go c.zap.client.Middleware(ctx, request)
if c.slog.status {
go c.slog.client.Middleware(ctx, request)
}
return request, err

@ -20,9 +20,9 @@ type Client struct {
appSecret string // 密钥
adzoneId int64 // mm_xxx_xxx_xxx的第三位
}
zap struct {
status bool // 状态
client *golog.ApiZapLog // 日志服务
slog struct {
status bool // 状态
client *golog.ApiSLog // 日志服务
}
}

@ -2,11 +2,11 @@ package taobao
import "github.com/dtapps/go-library/utils/golog"
// ConfigZapClientFun 日志配置
func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun) {
apiZapLog := apiZapLogFun()
if apiZapLog != nil {
c.zap.client = apiZapLog
c.zap.status = true
// ConfigSLogClientFun 日志配置
func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun) {
apiSLog := apiSLogFun()
if apiSLog != nil {
c.slog.client = apiSLog
c.slog.status = true
}
}

@ -24,8 +24,8 @@ func (c *Client) request(ctx context.Context, params map[string]interface{}) (go
}
// 记录日志
if c.zap.status {
go c.zap.client.MiddlewareCustom(ctx, fmt.Sprintf("%s", params["method"]), request)
if c.slog.status {
go c.slog.client.MiddlewareCustom(ctx, fmt.Sprintf("%s", params["method"]), request)
}
return request, err

@ -30,9 +30,9 @@ type Client struct {
redisClient *dorm.RedisClient // 缓存数据库
wechatAccessTokenPrefix string // AccessToken
}
zap struct {
status bool // 状态
client *golog.ApiZapLog // 日志服务
slog struct {
status bool // 状态
client *golog.ApiSLog // 日志服务
}
}

@ -26,11 +26,11 @@ func (c *Client) ConfigRedisCachePrefixFunWechatAccessToken(config string) error
return nil
}
// ConfigZapClientFun 日志配置
func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun) {
apiZapLog := apiZapLogFun()
if apiZapLog != nil {
c.zap.client = apiZapLog
c.zap.status = true
// ConfigSLogClientFun 日志配置
func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun) {
apiSLog := apiSLogFun()
if apiSLog != nil {
c.slog.client = apiSLog
c.slog.status = true
}
}

@ -32,8 +32,8 @@ func (c *Client) request(ctx context.Context, url string, params map[string]inte
}
// 记录日志
if c.zap.status {
go c.zap.client.Middleware(ctx, request)
if c.slog.status {
go c.slog.client.Middleware(ctx, request)
}
return request, err

@ -33,9 +33,9 @@ type Client struct {
wechatAccessTokenPrefix string // AccessToken
wechatJsapiTicketPrefix string // JsapiTicket
}
zap struct {
status bool // 状态
client *golog.ApiZapLog // 日志服务
slog struct {
status bool // 状态
client *golog.ApiSLog // 日志服务
}
}

@ -9,11 +9,11 @@ func (c *Client) ConfigApp(appId, appSecret string) *Client {
return c
}
// ConfigZapClientFun 日志配置
func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun) {
apiZapLog := apiZapLogFun()
if apiZapLog != nil {
c.zap.client = apiZapLog
c.zap.status = true
// ConfigSLogClientFun 日志配置
func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun) {
apiSLog := apiSLogFun()
if apiSLog != nil {
c.slog.client = apiSLog
c.slog.status = true
}
}

@ -32,8 +32,8 @@ func (c *Client) request(ctx context.Context, url string, params map[string]inte
}
// 记录日志
if c.zap.status {
go c.zap.client.Middleware(ctx, request)
if c.slog.status {
go c.slog.client.Middleware(ctx, request)
}
return request, err

@ -29,9 +29,9 @@ type Client struct {
authorizerAccessToken string // 授权方access_token
authorizerRefreshToken string // 授权方refresh_token
}
zap struct {
status bool // 状态
client *golog.ApiZapLog // 日志服务
slog struct {
status bool // 状态
client *golog.ApiSLog // 日志服务
}
}

@ -2,11 +2,11 @@ package wechatopen
import "github.com/dtapps/go-library/utils/golog"
// ConfigZapClientFun 日志配置
func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun) {
apiZapLog := apiZapLogFun()
if apiZapLog != nil {
c.zap.client = apiZapLog
c.zap.status = true
// ConfigSLogClientFun 日志配置
func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun) {
apiSLog := apiSLogFun()
if apiSLog != nil {
c.slog.client = apiSLog
c.slog.status = true
}
}

@ -32,8 +32,8 @@ func (c *Client) request(ctx context.Context, url string, params map[string]inte
}
// 记录日志
if c.zap.status {
go c.zap.client.Middleware(ctx, request)
if c.slog.status {
go c.slog.client.Middleware(ctx, request)
}
return request, err

@ -26,9 +26,9 @@ type Client struct {
certString string
keyString string
}
zap struct {
status bool // 状态
client *golog.ApiZapLog // 日志服务
slog struct {
status bool // 状态
client *golog.ApiSLog // 日志服务
}
}

@ -2,11 +2,11 @@ package wechatpayapiv2
import "github.com/dtapps/go-library/utils/golog"
// ConfigZapClientFun 日志配置
func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun) {
apiZapLog := apiZapLogFun()
if apiZapLog != nil {
c.zap.client = apiZapLog
c.zap.status = true
// ConfigSLogClientFun 日志配置
func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun) {
apiSLog := apiSLogFun()
if apiSLog != nil {
c.slog.client = apiSLog
c.slog.status = true
}
}

@ -32,8 +32,8 @@ func (c *Client) request(ctx context.Context, url string, params map[string]inte
}
// 记录日志
if c.zap.status {
go c.zap.client.MiddlewareXml(ctx, request)
if c.slog.status {
go c.slog.client.MiddlewareXml(ctx, request)
}
return request, err

@ -28,9 +28,9 @@ type Client struct {
mchSslSerialNo string // pem 证书号
mchSslKey string // pem key 内容
}
zap struct {
status bool // 状态
client *golog.ApiZapLog // 日志服务
slog struct {
status bool // 状态
client *golog.ApiSLog // 日志服务
}
}

@ -8,11 +8,11 @@ func (c *Client) ConfigApp(appId, appSecret string) *Client {
return c
}
// ConfigZapClientFun 日志配置
func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun) {
apiZapLog := apiZapLogFun()
if apiZapLog != nil {
c.zap.client = apiZapLog
c.zap.status = true
// ConfigSLogClientFun 日志配置
func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun) {
apiSLog := apiSLogFun()
if apiSLog != nil {
c.slog.client = apiSLog
c.slog.status = true
}
}

@ -55,8 +55,8 @@ func (c *Client) request(ctx context.Context, url string, params map[string]inte
}
// 记录日志
if c.zap.status {
go c.zap.client.Middleware(ctx, request)
if c.slog.status {
go c.slog.client.Middleware(ctx, request)
}
return request, err

@ -32,9 +32,9 @@ type Client struct {
mchSslCer string // pem 内容
mchSslKey string // pem key 内容
}
zap struct {
status bool // 状态
client *golog.ApiZapLog // 日志服务
slog struct {
status bool // 状态
client *golog.ApiSLog // 日志服务
}
}

@ -4,11 +4,11 @@ import (
"github.com/dtapps/go-library/utils/golog"
)
// ConfigZapClientFun 日志配置
func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun) {
apiZapLog := apiZapLogFun()
if apiZapLog != nil {
c.zap.client = apiZapLog
c.zap.status = true
// ConfigSLogClientFun 日志配置
func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun) {
apiSLog := apiSLogFun()
if apiSLog != nil {
c.slog.client = apiSLog
c.slog.status = true
}
}

@ -48,8 +48,8 @@ func (c *Client) request(ctx context.Context, url string, params map[string]inte
}
// 记录日志
if c.zap.status {
go c.zap.client.Middleware(ctx, request)
if c.slog.status {
go c.slog.client.Middleware(ctx, request)
}
return request, err

@ -24,9 +24,9 @@ type Client struct {
redirectUri string
key string
}
zap struct {
status bool // 状态
client *golog.ApiZapLog // 日志服务
slog struct {
status bool // 状态
client *golog.ApiSLog // 日志服务
}
}

@ -7,11 +7,11 @@ func (c *Client) Config(key string) *Client {
return c
}
// ConfigZapClientFun 日志配置
func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun) {
apiZapLog := apiZapLogFun()
if apiZapLog != nil {
c.zap.client = apiZapLog
c.zap.status = true
// ConfigSLogClientFun 日志配置
func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun) {
apiSLog := apiSLogFun()
if apiSLog != nil {
c.slog.client = apiSLog
c.slog.status = true
}
}

@ -28,8 +28,8 @@ func (c *Client) request(ctx context.Context, url string, params map[string]inte
}
// 记录日志
if c.zap.status {
go c.zap.client.Middleware(ctx, request)
if c.slog.status {
go c.slog.client.Middleware(ctx, request)
}
return request, err

@ -32,9 +32,9 @@ type Client struct {
redisClient *dorm.RedisClient // 缓存数据库
wechatAccessTokenPrefix string // AccessToken
}
zap struct {
status bool // 状态
client *golog.ApiZapLog // 日志服务
slog struct {
status bool // 状态
client *golog.ApiSLog // 日志服务
}
}

@ -15,11 +15,11 @@ func (c *Client) ConfigPid(pid string) *Client {
return c
}
// ConfigZapClientFun 日志配置
func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun) {
apiZapLog := apiZapLogFun()
if apiZapLog != nil {
c.zap.client = apiZapLog
c.zap.status = true
// ConfigSLogClientFun 日志配置
func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun) {
apiSLog := apiSLogFun()
if apiSLog != nil {
c.slog.client = apiSLog
c.slog.status = true
}
}

@ -32,8 +32,8 @@ func (c *Client) request(ctx context.Context, url string, params map[string]inte
}
// 记录日志
if c.zap.status {
go c.zap.client.Middleware(ctx, request)
if c.slog.status {
go c.slog.client.Middleware(ctx, request)
}
return request, err

@ -18,9 +18,9 @@ type Client struct {
config struct {
ua string // 用户代理
}
zap struct {
status bool // 状态
client *golog.ApiZapLog // 日志服务
slog struct {
status bool // 状态
client *golog.ApiSLog // 日志服务
}
}

@ -2,11 +2,11 @@ package weishi
import "github.com/dtapps/go-library/utils/golog"
// ConfigZapClientFun 日志配置
func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun) {
apiZapLog := apiZapLogFun()
if apiZapLog != nil {
c.zap.client = apiZapLog
c.zap.status = true
// ConfigSLogClientFun 日志配置
func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun) {
apiSLog := apiSLogFun()
if apiSLog != nil {
c.slog.client = apiSLog
c.slog.status = true
}
}

@ -23,8 +23,8 @@ func (c *Client) request(ctx context.Context, url string) (gorequest.Response, e
}
// 记录日志
if c.zap.status {
go c.zap.client.Middleware(ctx, request)
if c.slog.status {
go c.slog.client.Middleware(ctx, request)
}
return request, err

@ -22,9 +22,9 @@ type Client struct {
appKey int64 // key
appSecret string // secret
}
zap struct {
status bool // 状态
client *golog.ApiZapLog // 日志服务
slog struct {
status bool // 状态
client *golog.ApiSLog // 日志服务
}
}

@ -10,11 +10,11 @@ func (c *Client) ConfigApp(storeId, appKey int64, appSecret string) *Client {
return c
}
// ConfigZapClientFun 日志配置
func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun) {
apiZapLog := apiZapLogFun()
if apiZapLog != nil {
c.zap.client = apiZapLog
c.zap.status = true
// ConfigSLogClientFun 日志配置
func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun) {
apiSLog := apiSLogFun()
if apiSLog != nil {
c.slog.client = apiSLog
c.slog.status = true
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save