Skip to content

Commit

Permalink
feat: Update log package
Browse files Browse the repository at this point in the history
  • Loading branch information
scorpiotzh committed Oct 17, 2023
1 parent 5e395e9 commit 5306622
Show file tree
Hide file tree
Showing 16 changed files with 53 additions and 49 deletions.
4 changes: 2 additions & 2 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"context"
"fmt"
"github.com/scorpiotzh/mylog"
"github.com/dotbitHQ/das-lib/http_api/logger"
"github.com/scorpiotzh/toolib"
"github.com/urfave/cli/v2"
"os"
Expand All @@ -19,7 +19,7 @@ import (
)

var (
log = mylog.NewLogger("main", mylog.LevelDebug)
log = logger.NewLogger("main", logger.LevelDebug)
exit = make(chan struct{})
ctxServer, cancel = context.WithCancel(context.Background())
wgServer = sync.WaitGroup{}
Expand Down
4 changes: 2 additions & 2 deletions cmd/refund/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"context"
"fmt"
"github.com/scorpiotzh/mylog"
"github.com/dotbitHQ/das-lib/http_api/logger"
"github.com/scorpiotzh/toolib"
"github.com/urfave/cli/v2"
"os"
Expand All @@ -15,7 +15,7 @@ import (
)

var (
log = mylog.NewLogger("main", mylog.LevelDebug)
log = logger.NewLogger("main", logger.LevelDebug)
exit = make(chan struct{})
ctxServer, cancel = context.WithCancel(context.Background())
wgServer = sync.WaitGroup{}
Expand Down
12 changes: 6 additions & 6 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"github.com/dotbitHQ/das-lib/common"
"github.com/dotbitHQ/das-lib/core"
"github.com/dotbitHQ/das-lib/dascache"
"github.com/dotbitHQ/das-lib/http_api/logger"
"github.com/dotbitHQ/das-lib/remote_sign"
"github.com/dotbitHQ/das-lib/sign"
"github.com/dotbitHQ/das-lib/txbuilder"
Expand All @@ -14,7 +15,6 @@ import (
"github.com/nervosnetwork/ckb-sdk-go/rpc"
"github.com/nervosnetwork/ckb-sdk-go/transaction"
"github.com/nervosnetwork/ckb-sdk-go/types"
"github.com/scorpiotzh/mylog"
"github.com/scorpiotzh/toolib"
"github.com/stripe/stripe-go/v74"
"strings"
Expand All @@ -25,18 +25,18 @@ import (

var (
Cfg CfgServer
log = mylog.NewLogger("config", mylog.LevelDebug)
log = logger.NewLogger("config", logger.LevelDebug)
)

func InitCfg(configFilePath string) error {
if configFilePath == "" {
configFilePath = "./config/config.yaml"
}
log.Info("config file path:", configFilePath)
log.Debug("config file path:", configFilePath)
if err := toolib.UnmarshalYamlFile(configFilePath, &Cfg); err != nil {
return fmt.Errorf("UnmarshalYamlFile err:%s", err.Error())
}
log.Info("config file:", toolib.JsonString(Cfg))
log.Debug("config file:", toolib.JsonString(Cfg))
initStripe()
return nil
}
Expand All @@ -46,11 +46,11 @@ func AddCfgFileWatcher(configFilePath string) (*fsnotify.Watcher, error) {
configFilePath = "./config/config.yaml"
}
return toolib.AddFileWatcher(configFilePath, func() {
log.Info("config file path:", configFilePath)
log.Debug("config file path:", configFilePath)
if err := toolib.UnmarshalYamlFile(configFilePath, &Cfg); err != nil {
log.Error("UnmarshalYamlFile err:", err.Error())
}
log.Info("config file:", toolib.JsonString(Cfg))
log.Debug("config file:", toolib.JsonString(Cfg))
initStripe()
})
}
Expand Down
6 changes: 3 additions & 3 deletions dao/dao.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package dao

import (
"fmt"
"github.com/scorpiotzh/toolib"
"github.com/dotbitHQ/das-lib/http_api"
"gorm.io/gorm"
"unipay/config"
"unipay/tables"
Expand All @@ -13,7 +13,7 @@ type DbDao struct {
}

func NewGormDBNotAutoMigrate(dbMysql config.DbMysql) (*DbDao, error) {
db, err := toolib.NewGormDB(dbMysql.Addr, dbMysql.User, dbMysql.Password, dbMysql.DbName, 100, 100)
db, err := http_api.NewGormDB(dbMysql.Addr, dbMysql.User, dbMysql.Password, dbMysql.DbName, 100, 100)
if err != nil {
return nil, fmt.Errorf("toolib.NewGormDB err: %s", err.Error())
}
Expand All @@ -22,7 +22,7 @@ func NewGormDBNotAutoMigrate(dbMysql config.DbMysql) (*DbDao, error) {
}

func NewGormDB(dbMysql config.DbMysql) (*DbDao, error) {
db, err := toolib.NewGormDB(dbMysql.Addr, dbMysql.User, dbMysql.Password, dbMysql.DbName, 100, 100)
db, err := http_api.NewGormDB(dbMysql.Addr, dbMysql.User, dbMysql.Password, dbMysql.DbName, 100, 100)
if err != nil {
return nil, fmt.Errorf("toolib.NewGormDB err: %s", err.Error())
}
Expand Down
9 changes: 5 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.18

require (
github.com/btcsuite/btcd v0.23.3
github.com/dotbitHQ/das-lib v1.1.1-0.20230908084332-05bca73e0fdd
github.com/dotbitHQ/das-lib v1.1.1-0.20231009040113-32bdbc9aa11f
github.com/ethereum/go-ethereum v1.10.26
github.com/fbsobreira/gotron-sdk v0.0.0-20230323193002-7843d2a7548e
github.com/fsnotify/fsnotify v1.5.4
Expand All @@ -13,7 +13,6 @@ require (
github.com/nervosnetwork/ckb-sdk-go v0.101.3
github.com/parnurzeal/gorequest v0.2.16
github.com/robfig/cron/v3 v3.0.1
github.com/scorpiotzh/mylog v1.0.10
github.com/scorpiotzh/toolib v1.1.6
github.com/shopspring/decimal v1.3.1
github.com/stripe/stripe-go/v74 v74.20.0
Expand All @@ -39,6 +38,7 @@ require (
github.com/decred/dcrd/crypto/blake256 v1.0.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect
github.com/getsentry/sentry-go v0.24.0 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-ole/go-ole v1.2.1 // indirect
github.com/go-playground/locales v0.14.1 // indirect
Expand All @@ -49,7 +49,7 @@ require (
github.com/go-stack/stack v1.8.0 // indirect
github.com/goccy/go-json v0.10.0 // indirect
github.com/gogf/gf/v2 v2.3.3 // indirect
github.com/google/uuid v1.2.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
Expand All @@ -64,6 +64,7 @@ require (
github.com/pkg/errors v0.9.1 // indirect
github.com/rjeczalik/notify v0.9.3 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/scorpiotzh/mylog v1.0.10 // indirect
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect
github.com/smartystreets/goconvey v1.7.2 // indirect
github.com/tklauser/go-sysconf v0.3.5 // indirect
Expand All @@ -84,7 +85,7 @@ require (
golang.org/x/text v0.8.0 // indirect
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987 // indirect
google.golang.org/grpc v1.46.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
google.golang.org/protobuf v1.29.1 // indirect
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
Expand Down
27 changes: 15 additions & 12 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN
github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc=
github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/toml v1.1.0 h1:ksErzDEI1khOiGPgpwuI7x2ebx/uXQNw7xJpn9Eq1+I=
github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8=
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
Expand Down Expand Up @@ -108,8 +108,8 @@ github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8
github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=
github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/dop251/goja v0.0.0-20200219165308-d1232e640a87/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA=
github.com/dotbitHQ/das-lib v1.1.1-0.20230908084332-05bca73e0fdd h1:2vgbhbqJU7kKXFxuS5fFEB3SqlFIpHeBS7HVbxbBg4A=
github.com/dotbitHQ/das-lib v1.1.1-0.20230908084332-05bca73e0fdd/go.mod h1:bWgGqfGuc9moidjzK7MpC0q80d694ucm0961MEMNiaI=
github.com/dotbitHQ/das-lib v1.1.1-0.20231009040113-32bdbc9aa11f h1:rTIwcbnOvNXEm8LOOjCLA1J7fcINrTaybgeAk8w+gFg=
github.com/dotbitHQ/das-lib v1.1.1-0.20231009040113-32bdbc9aa11f/go.mod h1:6zhVMmqpRLq1bR8BqAdh/Nf8GQdJ5pREhBAwnImYQGg=
github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw=
github.com/elastic/gosigar v0.8.1-0.20180330100440-37f05ff46ffa/go.mod h1:cdorVVzy1fhmEqmtgqkoE3bYtCfSCkVyjTyCIo22xvs=
Expand All @@ -136,12 +136,15 @@ github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwV
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI=
github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww=
github.com/getsentry/sentry-go v0.24.0 h1:02b7qEmJ56EHGe9KFgjArjU/vG/aywm7Efgu+iPc01Y=
github.com/getsentry/sentry-go v0.24.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
github.com/gin-gonic/gin v1.7.2/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY=
github.com/gin-gonic/gin v1.9.0 h1:OjyFBKICoexlu99ctXNR2gg+c5pKrKMuyjgARg9qeY8=
github.com/gin-gonic/gin v1.9.0/go.mod h1:W1Me9+hsUSyj3CePGrd1/QrKJMSJ1Tu/0hFEH89961k=
github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA=
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
Expand Down Expand Up @@ -207,12 +210,12 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs=
github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
Expand Down Expand Up @@ -268,8 +271,8 @@ github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ic
github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo=
github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
github.com/mattn/go-colorable v0.1.0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-colorable v0.1.9 h1:sqDoxXbdeALODt0DAeJCVp38ps9ZogZEAXjus69YV3U=
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc=
github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc=
github.com/mattn/go-isatty v0.0.5-0.20180830101745-3fb116b82035/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
Expand Down Expand Up @@ -326,6 +329,7 @@ github.com/pborman/uuid v0.0.0-20170112150404-1b00554d8222/go.mod h1:VyrYX9gd7ir
github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU=
github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek=
github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0=
github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
Expand Down Expand Up @@ -382,8 +386,8 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
github.com/stripe/stripe-go/v74 v74.20.0 h1:jIZS4gnacATZ74irqhs9E7pw5X4Te+KHoCy00lEeeKE=
github.com/stripe/stripe-go/v74 v74.20.0/go.mod h1:f9L6LvaXa35ja7eyvP6GQswoaIPaBRvGAimAO+udbBw=
github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA=
Expand Down Expand Up @@ -520,7 +524,7 @@ golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2/go.mod h1:EFNZuWvGYxIRUEX
golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68=
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba h1:O8mE0/t419eoIwhTFpKVkHiTs/Igowgfkj25AcZrtiE=
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
Expand All @@ -537,7 +541,6 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df h1:5Pf6pFKu98ODmgnpvkJ3kFUOQGGLIzLIkbzUHp47618=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
Expand Down Expand Up @@ -567,8 +570,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.29.1 h1:7QBf+IK2gx70Ap/hDsOmam3GE0v9HicjfEdAxE62UoM=
google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc h1:2gGKlE2+asNV9m7xrywl36YYNnBG5ZQ0r/BOOxqPpmk=
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk=
Expand Down
4 changes: 2 additions & 2 deletions http_svr/handle/handle.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import (
"context"
"fmt"
"github.com/dotbitHQ/das-lib/core"
"github.com/dotbitHQ/das-lib/http_api/logger"
"github.com/gin-gonic/gin"
"github.com/scorpiotzh/mylog"
"unipay/dao"
"unipay/notify"
)

var (
log = mylog.NewLogger("http_handle", mylog.LevelDebug)
log = logger.NewLogger("http_handle", logger.LevelDebug)
)

type HttpHandle struct {
Expand Down
4 changes: 2 additions & 2 deletions http_svr/http_svr.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ package http_svr

import (
"context"
"github.com/dotbitHQ/das-lib/http_api/logger"
"github.com/gin-gonic/gin"
"github.com/scorpiotzh/mylog"
"net/http"
"unipay/http_svr/handle"
)

var (
log = mylog.NewLogger("http_svr", mylog.LevelDebug)
log = logger.NewLogger("http_svr", logger.LevelDebug)
)

type HttpSvr struct {
Expand Down
4 changes: 2 additions & 2 deletions notify/notify.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package notify

import (
"fmt"
"github.com/dotbitHQ/das-lib/http_api/logger"
"github.com/parnurzeal/gorequest"
"github.com/scorpiotzh/mylog"
"time"
)

var log = mylog.NewLogger("notify", mylog.LevelDebug)
var log = logger.NewLogger("notify", logger.LevelDebug)

const (
LarkNotifyUrl = "https://open.larksuite.com/open-apis/bot/v2/hook/%s"
Expand Down
4 changes: 2 additions & 2 deletions parser/parser_bitcoin/parser_bitcoin.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/txscript"
"github.com/dotbitHQ/das-lib/bitcoin"
"github.com/scorpiotzh/mylog"
"github.com/dotbitHQ/das-lib/http_api/logger"
"github.com/shopspring/decimal"
"golang.org/x/sync/errgroup"
"strings"
Expand All @@ -18,7 +18,7 @@ import (
"unipay/tables"
)

var log = mylog.NewLogger("parser_bitcoin", mylog.LevelDebug)
var log = logger.NewLogger("parser_bitcoin", logger.LevelDebug)

type ParserBitcoin struct {
NodeRpc *bitcoin.BaseRequest
Expand Down
4 changes: 2 additions & 2 deletions parser/parser_ckb/parser_ckb.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"context"
"fmt"
"github.com/dotbitHQ/das-lib/common"
"github.com/dotbitHQ/das-lib/http_api/logger"
"github.com/nervosnetwork/ckb-sdk-go/address"
"github.com/nervosnetwork/ckb-sdk-go/rpc"
"github.com/nervosnetwork/ckb-sdk-go/types"
"github.com/scorpiotzh/mylog"
"github.com/scorpiotzh/toolib"
"github.com/shopspring/decimal"
"golang.org/x/sync/errgroup"
Expand All @@ -18,7 +18,7 @@ import (
"unipay/tables"
)

var log = mylog.NewLogger("parser_ckb", mylog.LevelDebug)
var log = logger.NewLogger("parser_ckb", logger.LevelDebug)

type ParserCkb struct {
Ctx context.Context
Expand Down
4 changes: 2 additions & 2 deletions parser/parser_common/parser_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ package parser_common

import (
"fmt"
"github.com/scorpiotzh/mylog"
"github.com/dotbitHQ/das-lib/http_api/logger"
"strings"
"sync/atomic"
"time"
"unipay/config"
"unipay/notify"
)

var log = mylog.NewLogger("parser_common", mylog.LevelDebug)
var log = logger.NewLogger("parser_common", logger.LevelDebug)

type ParserApi interface {
GetLatestBlockNumber() (uint64, error)
Expand Down
4 changes: 2 additions & 2 deletions parser/parser_evm/parser_evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"github.com/dotbitHQ/das-lib/chain/chain_evm"
dascommon "github.com/dotbitHQ/das-lib/common"
"github.com/dotbitHQ/das-lib/http_api/logger"
ethcommon "github.com/ethereum/go-ethereum/common"
"github.com/scorpiotzh/mylog"
"github.com/scorpiotzh/toolib"
"github.com/shopspring/decimal"
"golang.org/x/sync/errgroup"
Expand All @@ -16,7 +16,7 @@ import (
"unipay/tables"
)

var log = mylog.NewLogger("parser_evm", mylog.LevelDebug)
var log = logger.NewLogger("parser_evm", logger.LevelDebug)

type ParserEvm struct {
ChainEvm *chain_evm.ChainEvm
Expand Down
Loading

0 comments on commit 5306622

Please sign in to comment.