You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
538 B
26 lines
538 B
5 months ago
|
package golog
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"go.dtapp.net/goip"
|
||
|
)
|
||
|
|
||
|
// GinSLogCustom 框架自定义日志
|
||
|
type GinSLogCustom struct {
|
||
|
ipService *goip.Client // IP服务
|
||
|
slog struct {
|
||
|
status bool // 状态
|
||
|
client *SLog // 日志服务
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// GinSLogCustomFun 框架自定义日志驱动
|
||
|
type GinSLogCustomFun func() *GinSLogCustom
|
||
|
|
||
|
// NewGinSLogCustom 创建框架实例化
|
||
|
func NewGinSLogCustom(ctx context.Context, ipService *goip.Client) (*GinSLogCustom, error) {
|
||
|
c := &GinSLogCustom{}
|
||
|
c.ipService = ipService
|
||
|
return c, nil
|
||
|
}
|