diff --git a/client/dtmcli/barrier.go b/client/dtmcli/barrier.go index 7c1224d..a21d628 100644 --- a/client/dtmcli/barrier.go +++ b/client/dtmcli/barrier.go @@ -12,7 +12,7 @@ import ( "net/url" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" + "github.com/dtm-labs/logger" ) // BarrierBusiFunc type for busi func diff --git a/client/dtmcli/barrier_mongo.go b/client/dtmcli/barrier_mongo.go index b2d2668..8d47258 100644 --- a/client/dtmcli/barrier_mongo.go +++ b/client/dtmcli/barrier_mongo.go @@ -5,7 +5,7 @@ import ( "strings" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" + "github.com/dtm-labs/logger" "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/mongo" ) diff --git a/client/dtmcli/barrier_redis.go b/client/dtmcli/barrier_redis.go index 62aeeb9..0ef8c4a 100644 --- a/client/dtmcli/barrier_redis.go +++ b/client/dtmcli/barrier_redis.go @@ -4,7 +4,7 @@ import ( "fmt" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" + "github.com/dtm-labs/logger" "github.com/go-redis/redis/v8" ) diff --git a/client/dtmcli/dtmimp/utils.go b/client/dtmcli/dtmimp/utils.go index a857c5f..b6e45cb 100644 --- a/client/dtmcli/dtmimp/utils.go +++ b/client/dtmcli/dtmimp/utils.go @@ -19,7 +19,7 @@ import ( "sync" "time" - "github.com/dtm-labs/dtm/client/dtmcli/logger" + "github.com/dtm-labs/logger" "github.com/go-resty/resty/v2" ) diff --git a/client/dtmcli/dtmimp/vars.go b/client/dtmcli/dtmimp/vars.go index b0f70da..14259dd 100644 --- a/client/dtmcli/dtmimp/vars.go +++ b/client/dtmcli/dtmimp/vars.go @@ -9,8 +9,8 @@ package dtmimp import ( "errors" - "github.com/dtm-labs/dtm/client/dtmcli/logger" "github.com/dtm-labs/dtmdriver" + "github.com/dtm-labs/logger" "github.com/go-resty/resty/v2" ) diff --git a/client/dtmcli/logger/logger.go b/client/dtmcli/logger/logger.go new file mode 100644 index 0000000..f5a48f1 --- /dev/null +++ b/client/dtmcli/logger/logger.go @@ -0,0 +1,31 @@ +package logger + +import ( + "github.com/dtm-labs/logger" +) + +var ( + // WithLogger replaces default logger + WithLogger = logger.WithLogger + // InitLog is an initialization for a logger + // level can be: debug info warn error + InitLog = logger.InitLog + // InitLog2 specify advanced log config + InitLog2 = logger.InitLog2 + // Debugf log to level debug + Debugf = logger.Debugf + + // Infof log to level info + Infof = logger.Infof + + // Warnf log to level warn + Warnf = logger.Warnf + // Errorf log to level error + Errorf = logger.Errorf + + // FatalfIf log to level error + FatalfIf = logger.FatalfIf + + // FatalIfError if err is not nil, then log to level fatal and call os.Exit + FatalIfError = logger.FatalIfError +) diff --git a/client/dtmgrpc/dtmgimp/grpc_clients.go b/client/dtmgrpc/dtmgimp/grpc_clients.go index cfce542..2291c52 100644 --- a/client/dtmgrpc/dtmgimp/grpc_clients.go +++ b/client/dtmgrpc/dtmgimp/grpc_clients.go @@ -11,9 +11,9 @@ import ( "sync" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" "github.com/dtm-labs/dtm/client/dtmgrpc/dtmgpb" "github.com/dtm-labs/dtmdriver" + "github.com/dtm-labs/logger" grpc "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" ) diff --git a/client/dtmgrpc/dtmgimp/types.go b/client/dtmgrpc/dtmgimp/types.go index 929dc1f..431aa05 100644 --- a/client/dtmgrpc/dtmgimp/types.go +++ b/client/dtmgrpc/dtmgimp/types.go @@ -12,8 +12,8 @@ import ( "time" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" "github.com/dtm-labs/dtmdriver" + "github.com/dtm-labs/logger" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" diff --git a/client/dtmgrpc/dtmgimp/utils.go b/client/dtmgrpc/dtmgimp/utils.go index 44fc76f..6637044 100644 --- a/client/dtmgrpc/dtmgimp/utils.go +++ b/client/dtmgrpc/dtmgimp/utils.go @@ -10,8 +10,8 @@ import ( context "context" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" "github.com/dtm-labs/dtm/client/dtmgrpc/dtmgpb" + "github.com/dtm-labs/logger" "google.golang.org/grpc/metadata" "google.golang.org/protobuf/proto" emptypb "google.golang.org/protobuf/types/known/emptypb" diff --git a/client/workflow/factory.go b/client/workflow/factory.go index ea71351..dc3c379 100644 --- a/client/workflow/factory.go +++ b/client/workflow/factory.go @@ -4,7 +4,7 @@ import ( "fmt" "net/url" - "github.com/dtm-labs/dtm/client/dtmcli/logger" + "github.com/dtm-labs/logger" ) type workflowFactory struct { diff --git a/client/workflow/imp.go b/client/workflow/imp.go index 3429b42..38e5b9c 100644 --- a/client/workflow/imp.go +++ b/client/workflow/imp.go @@ -7,7 +7,7 @@ import ( "github.com/dtm-labs/dtm/client/dtmcli" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" + "github.com/dtm-labs/logger" "github.com/go-resty/resty/v2" ) diff --git a/client/workflow/workflow.go b/client/workflow/workflow.go index 8075536..f16117f 100644 --- a/client/workflow/workflow.go +++ b/client/workflow/workflow.go @@ -9,9 +9,9 @@ import ( "github.com/dtm-labs/dtm/client/dtmcli" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" "github.com/dtm-labs/dtm/client/dtmgrpc/dtmgimp" "github.com/dtm-labs/dtm/client/workflow/wfpb" + "github.com/dtm-labs/logger" "github.com/go-resty/resty/v2" "google.golang.org/grpc" ) diff --git a/dtmsvr/api.go b/dtmsvr/api.go index a1c80e9..557b03b 100644 --- a/dtmsvr/api.go +++ b/dtmsvr/api.go @@ -12,8 +12,8 @@ import ( "github.com/dtm-labs/dtm/client/dtmcli" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" "github.com/dtm-labs/dtm/dtmsvr/storage" + "github.com/dtm-labs/logger" ) // Version store the passin version for dtm server diff --git a/dtmsvr/api_json_rpc.go b/dtmsvr/api_json_rpc.go index bbbe693..4d1fa35 100644 --- a/dtmsvr/api_json_rpc.go +++ b/dtmsvr/api_json_rpc.go @@ -8,7 +8,7 @@ import ( "github.com/dtm-labs/dtm/client/dtmcli" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" + "github.com/dtm-labs/logger" "github.com/gin-gonic/gin" ) diff --git a/dtmsvr/config/config.go b/dtmsvr/config/config.go index 7a0e1a7..0ac3a86 100644 --- a/dtmsvr/config/config.go +++ b/dtmsvr/config/config.go @@ -5,7 +5,7 @@ import ( "io/ioutil" "github.com/dtm-labs/dtm/client/dtmcli" - "github.com/dtm-labs/dtm/client/dtmcli/logger" + "github.com/dtm-labs/logger" "gopkg.in/yaml.v3" ) diff --git a/dtmsvr/cron.go b/dtmsvr/cron.go index c93ec72..bd87e7e 100644 --- a/dtmsvr/cron.go +++ b/dtmsvr/cron.go @@ -15,7 +15,7 @@ import ( "github.com/dtm-labs/dtm/client/dtmcli" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" + "github.com/dtm-labs/logger" ) // NowForwardDuration will be set in test, trans may be timeout diff --git a/dtmsvr/entry/main.go b/dtmsvr/entry/main.go index df91118..475ab78 100644 --- a/dtmsvr/entry/main.go +++ b/dtmsvr/entry/main.go @@ -8,10 +8,10 @@ import ( "time" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" "github.com/dtm-labs/dtm/dtmsvr" "github.com/dtm-labs/dtm/dtmsvr/config" "github.com/dtm-labs/dtm/dtmsvr/storage/registry" + "github.com/dtm-labs/logger" "github.com/gin-gonic/gin" "go.uber.org/automaxprocs/maxprocs" ) diff --git a/dtmsvr/storage/boltdb/boltdb.go b/dtmsvr/storage/boltdb/boltdb.go index 29dcebd..eec34b7 100644 --- a/dtmsvr/storage/boltdb/boltdb.go +++ b/dtmsvr/storage/boltdb/boltdb.go @@ -12,9 +12,9 @@ import ( "time" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" "github.com/dtm-labs/dtm/dtmsvr/storage" "github.com/dtm-labs/dtm/dtmutil" + "github.com/dtm-labs/logger" bolt "go.etcd.io/bbolt" ) diff --git a/dtmsvr/storage/redis/redis.go b/dtmsvr/storage/redis/redis.go index b1e1d7a..cfd5932 100644 --- a/dtmsvr/storage/redis/redis.go +++ b/dtmsvr/storage/redis/redis.go @@ -16,10 +16,10 @@ import ( "github.com/go-redis/redis/v8" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" "github.com/dtm-labs/dtm/dtmsvr/config" "github.com/dtm-labs/dtm/dtmsvr/storage" "github.com/dtm-labs/dtm/dtmutil" + "github.com/dtm-labs/logger" ) // TODO: optimize this, it's very strange to use pointer to dtmutil.Config diff --git a/dtmsvr/storage/registry/registry.go b/dtmsvr/storage/registry/registry.go index afa86d6..297c875 100644 --- a/dtmsvr/storage/registry/registry.go +++ b/dtmsvr/storage/registry/registry.go @@ -3,7 +3,7 @@ package registry import ( "time" - "github.com/dtm-labs/dtm/client/dtmcli/logger" + "github.com/dtm-labs/logger" "github.com/dtm-labs/dtm/dtmsvr/config" "github.com/dtm-labs/dtm/dtmsvr/storage" diff --git a/dtmsvr/svr.go b/dtmsvr/svr.go index 8a41b76..1626e9a 100644 --- a/dtmsvr/svr.go +++ b/dtmsvr/svr.go @@ -16,11 +16,11 @@ import ( "github.com/gin-gonic/gin" "github.com/dtm-labs/dtm/client/dtmcli" - "github.com/dtm-labs/dtm/client/dtmcli/logger" "github.com/dtm-labs/dtm/client/dtmgrpc/dtmgimp" "github.com/dtm-labs/dtm/client/dtmgrpc/dtmgpb" "github.com/dtm-labs/dtm/dtmutil" "github.com/dtm-labs/dtmdriver" + "github.com/dtm-labs/logger" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/dtmsvr/trans_class.go b/dtmsvr/trans_class.go index aed1dcf..0a45803 100644 --- a/dtmsvr/trans_class.go +++ b/dtmsvr/trans_class.go @@ -6,10 +6,10 @@ import ( "github.com/dtm-labs/dtm/client/dtmcli" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" "github.com/dtm-labs/dtm/client/dtmgrpc/dtmgimp" "github.com/dtm-labs/dtm/client/dtmgrpc/dtmgpb" "github.com/dtm-labs/dtm/dtmsvr/storage" + "github.com/dtm-labs/logger" "github.com/gin-gonic/gin" ) diff --git a/dtmsvr/trans_process.go b/dtmsvr/trans_process.go index 7050ae3..887a0b1 100644 --- a/dtmsvr/trans_process.go +++ b/dtmsvr/trans_process.go @@ -13,8 +13,8 @@ import ( "github.com/dtm-labs/dtm/client/dtmcli" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" "github.com/dtm-labs/dtm/dtmutil" + "github.com/dtm-labs/logger" ) // Process process global transaction once diff --git a/dtmsvr/trans_status.go b/dtmsvr/trans_status.go index 6539fcc..9453a8c 100644 --- a/dtmsvr/trans_status.go +++ b/dtmsvr/trans_status.go @@ -9,11 +9,11 @@ import ( "github.com/dtm-labs/dtm/client/dtmcli" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" "github.com/dtm-labs/dtm/client/dtmgrpc" "github.com/dtm-labs/dtm/client/dtmgrpc/dtmgimp" "github.com/dtm-labs/dtm/dtmutil" "github.com/dtm-labs/dtmdriver" + "github.com/dtm-labs/logger" "github.com/lithammer/shortuuid/v3" "google.golang.org/grpc/metadata" ) diff --git a/dtmsvr/trans_type_msg.go b/dtmsvr/trans_type_msg.go index cc45245..f6ed89d 100644 --- a/dtmsvr/trans_type_msg.go +++ b/dtmsvr/trans_type_msg.go @@ -6,7 +6,7 @@ import ( "github.com/dtm-labs/dtm/client/dtmcli" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" + "github.com/dtm-labs/logger" ) type transMsgProcessor struct { diff --git a/dtmsvr/trans_type_saga.go b/dtmsvr/trans_type_saga.go index 4b6b8c1..4554a81 100644 --- a/dtmsvr/trans_type_saga.go +++ b/dtmsvr/trans_type_saga.go @@ -7,7 +7,7 @@ import ( "github.com/dtm-labs/dtm/client/dtmcli" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" + "github.com/dtm-labs/logger" ) type transSagaProcessor struct { diff --git a/dtmsvr/trans_type_tcc.go b/dtmsvr/trans_type_tcc.go index 6e1147d..767f17b 100644 --- a/dtmsvr/trans_type_tcc.go +++ b/dtmsvr/trans_type_tcc.go @@ -5,7 +5,7 @@ import ( "github.com/dtm-labs/dtm/client/dtmcli" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" + "github.com/dtm-labs/logger" ) type transTccProcessor struct { diff --git a/dtmutil/db.go b/dtmutil/db.go index da3a160..be4e7a8 100644 --- a/dtmutil/db.go +++ b/dtmutil/db.go @@ -8,7 +8,7 @@ import ( "github.com/dtm-labs/dtm/client/dtmcli" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" + "github.com/dtm-labs/logger" _ "github.com/go-sql-driver/mysql" // register mysql driver _ "github.com/lib/pq" // register postgres driver "gorm.io/driver/mysql" diff --git a/dtmutil/utils.go b/dtmutil/utils.go index 545e855..eec4265 100644 --- a/dtmutil/utils.go +++ b/dtmutil/utils.go @@ -22,7 +22,7 @@ import ( "github.com/dtm-labs/dtm/client/dtmcli" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" + "github.com/dtm-labs/logger" ) // GetGinApp init and return gin diff --git a/helper/bench/main.go b/helper/bench/main.go index 78d52af..7b0216c 100644 --- a/helper/bench/main.go +++ b/helper/bench/main.go @@ -5,12 +5,12 @@ import ( "os" "github.com/dtm-labs/dtm/client/dtmcli" - "github.com/dtm-labs/dtm/client/dtmcli/logger" "github.com/dtm-labs/dtm/dtmsvr" "github.com/dtm-labs/dtm/dtmsvr/config" "github.com/dtm-labs/dtm/dtmsvr/storage/registry" "github.com/dtm-labs/dtm/helper/bench/svr" "github.com/dtm-labs/dtm/test/busi" + "github.com/dtm-labs/logger" ) var usage = `bench is a bench test server for dtmf diff --git a/helper/bench/svr/http.go b/helper/bench/svr/http.go index 1944e1f..8f65c1e 100644 --- a/helper/bench/svr/http.go +++ b/helper/bench/svr/http.go @@ -17,10 +17,10 @@ import ( "github.com/dtm-labs/dtm/client/dtmcli" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" "github.com/dtm-labs/dtm/dtmsvr" "github.com/dtm-labs/dtm/dtmutil" "github.com/dtm-labs/dtm/test/busi" + "github.com/dtm-labs/logger" "github.com/gin-gonic/gin" "github.com/lithammer/shortuuid" ) diff --git a/helper/test-cover.sh b/helper/test-cover.sh index 0ecf97e..804eefc 100755 --- a/helper/test-cover.sh +++ b/helper/test-cover.sh @@ -1,7 +1,7 @@ set -x echo "mode: count" > coverage.txt for store in redis boltdb mysql postgres; do - TEST_STORE=$store go test -failfast -covermode count -coverprofile=profile.out -coverpkg=github.com/dtm-labs/dtm/client/dtmcli,github.com/dtm-labs/dtm/client/dtmcli/dtmimp,github.com/dtm-labs/dtm/client/dtmcli/logger,github.com/dtm-labs/dtm/client/dtmgrpc,github.com/dtm-labs/dtm/client/workflow,github.com/dtm-labs/dtm/client/dtmgrpc/dtmgimp,github.com/dtm-labs/dtm/dtmsvr,dtmsvr/config,github.com/dtm-labs/dtm/dtmsvr/storage,github.com/dtm-labs/dtm/dtmsvr/storage/boltdb,github.com/dtm-labs/dtm/dtmsvr/storage/redis,github.com/dtm-labs/dtm/dtmsvr/storage/registry,github.com/dtm-labs/dtm/dtmsvr/storage/sql,github.com/dtm-labs/dtm/dtmutil -gcflags=-l ./... || exit 1 + TEST_STORE=$store go test -failfast -covermode count -coverprofile=profile.out -coverpkg=github.com/dtm-labs/dtm/client/dtmcli,github.com/dtm-labs/dtm/client/dtmcli/dtmimp,github.com/dtm-labs/logger,github.com/dtm-labs/dtm/client/dtmgrpc,github.com/dtm-labs/dtm/client/workflow,github.com/dtm-labs/dtm/client/dtmgrpc/dtmgimp,github.com/dtm-labs/dtm/dtmsvr,dtmsvr/config,github.com/dtm-labs/dtm/dtmsvr/storage,github.com/dtm-labs/dtm/dtmsvr/storage/boltdb,github.com/dtm-labs/dtm/dtmsvr/storage/redis,github.com/dtm-labs/dtm/dtmsvr/storage/registry,github.com/dtm-labs/dtm/dtmsvr/storage/sql,github.com/dtm-labs/dtm/dtmutil -gcflags=-l ./... || exit 1 if [ -f profile.out ]; then cat profile.out | grep -v 'mode:' >> coverage.txt echo > profile.out diff --git a/main.go b/main.go index e203533..388fc72 100644 --- a/main.go +++ b/main.go @@ -19,10 +19,10 @@ import ( "strings" "syscall" - "github.com/dtm-labs/dtm/client/dtmcli/logger" "github.com/dtm-labs/dtm/dtmsvr/config" "github.com/dtm-labs/dtm/dtmsvr/entry" _ "github.com/dtm-labs/dtm/dtmsvr/microservices" + "github.com/dtm-labs/logger" "github.com/gin-gonic/gin" ) diff --git a/test/base_test.go b/test/base_test.go index 3969054..6dc727d 100644 --- a/test/base_test.go +++ b/test/base_test.go @@ -13,9 +13,9 @@ import ( "github.com/dtm-labs/dtm/client/dtmcli" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" "github.com/dtm-labs/dtm/dtmutil" "github.com/dtm-labs/dtm/test/busi" + "github.com/dtm-labs/logger" "github.com/stretchr/testify/assert" ) diff --git a/test/busi/base_grpc.go b/test/busi/base_grpc.go index 28569f9..b7eb4ea 100644 --- a/test/busi/base_grpc.go +++ b/test/busi/base_grpc.go @@ -15,9 +15,9 @@ import ( "time" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" "github.com/dtm-labs/dtm/client/dtmgrpc" "github.com/dtm-labs/dtm/dtmutil" + "github.com/dtm-labs/logger" "github.com/dtm-labs/dtm/client/dtmgrpc/dtmgimp" "github.com/dtm-labs/dtm/client/dtmgrpc/dtmgpb" diff --git a/test/busi/base_http.go b/test/busi/base_http.go index f5672b7..dcf5bf7 100644 --- a/test/busi/base_http.go +++ b/test/busi/base_http.go @@ -14,9 +14,9 @@ import ( "github.com/dtm-labs/dtm/client/dtmcli" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" "github.com/dtm-labs/dtm/client/workflow" "github.com/dtm-labs/dtm/dtmutil" + "github.com/dtm-labs/logger" "github.com/gin-gonic/gin" "gorm.io/driver/mysql" "gorm.io/driver/postgres" diff --git a/test/busi/base_jrpc.go b/test/busi/base_jrpc.go index c24b8f2..3072520 100644 --- a/test/busi/base_jrpc.go +++ b/test/busi/base_jrpc.go @@ -4,8 +4,8 @@ import ( "fmt" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" "github.com/dtm-labs/dtm/dtmutil" + "github.com/dtm-labs/logger" "github.com/gin-gonic/gin" ) diff --git a/test/busi/base_types.go b/test/busi/base_types.go index f10056a..f5c74b4 100644 --- a/test/busi/base_types.go +++ b/test/busi/base_types.go @@ -12,7 +12,7 @@ import ( "github.com/dtm-labs/dtm/client/dtmcli" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" + "github.com/dtm-labs/logger" "github.com/gin-gonic/gin" "go.mongodb.org/mongo-driver/bson" ) diff --git a/test/busi/data.go b/test/busi/data.go index e5f8726..f28e734 100644 --- a/test/busi/data.go +++ b/test/busi/data.go @@ -8,8 +8,8 @@ import ( "github.com/dtm-labs/dtm/client/dtmcli" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" "github.com/dtm-labs/dtm/dtmutil" + "github.com/dtm-labs/logger" "github.com/gin-gonic/gin" "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/mongo" diff --git a/test/busi/utils.go b/test/busi/utils.go index c7afe3c..ec60252 100644 --- a/test/busi/utils.go +++ b/test/busi/utils.go @@ -11,10 +11,10 @@ import ( "github.com/dtm-labs/dtm/client/dtmcli" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" "github.com/dtm-labs/dtm/client/dtmgrpc" "github.com/dtm-labs/dtm/client/dtmgrpc/dtmgpb" "github.com/dtm-labs/dtm/dtmutil" + "github.com/dtm-labs/logger" "github.com/gin-gonic/gin" "github.com/go-redis/redis/v8" "github.com/go-resty/resty/v2" diff --git a/test/main_test.go b/test/main_test.go index 1d34e65..299e435 100644 --- a/test/main_test.go +++ b/test/main_test.go @@ -13,7 +13,6 @@ import ( "github.com/dtm-labs/dtm/client/dtmcli" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" "github.com/dtm-labs/dtm/client/workflow" "github.com/dtm-labs/dtm/dtmsvr" "github.com/dtm-labs/dtm/dtmsvr/config" @@ -21,6 +20,7 @@ import ( "github.com/dtm-labs/dtm/dtmutil" "github.com/dtm-labs/dtm/test/busi" "github.com/dtm-labs/dtmdriver" + "github.com/dtm-labs/logger" ) func TestMain(m *testing.M) { diff --git a/test/msg_barrier_test.go b/test/msg_barrier_test.go index c6e1006..d252788 100644 --- a/test/msg_barrier_test.go +++ b/test/msg_barrier_test.go @@ -9,8 +9,8 @@ import ( "bou.ke/monkey" "github.com/dtm-labs/dtm/client/dtmcli" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" "github.com/dtm-labs/dtm/test/busi" + "github.com/dtm-labs/logger" "github.com/stretchr/testify/assert" ) diff --git a/test/msg_grpc_barrier_test.go b/test/msg_grpc_barrier_test.go index 5a3d012..2cb9b16 100644 --- a/test/msg_grpc_barrier_test.go +++ b/test/msg_grpc_barrier_test.go @@ -8,9 +8,9 @@ import ( "bou.ke/monkey" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" "github.com/dtm-labs/dtm/client/dtmgrpc" "github.com/dtm-labs/dtm/test/busi" + "github.com/dtm-labs/logger" "github.com/stretchr/testify/assert" ) diff --git a/test/tcc_barrier_test.go b/test/tcc_barrier_test.go index 286bb8c..171b429 100644 --- a/test/tcc_barrier_test.go +++ b/test/tcc_barrier_test.go @@ -14,8 +14,8 @@ import ( "github.com/dtm-labs/dtm/client/dtmcli" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" "github.com/dtm-labs/dtm/test/busi" + "github.com/dtm-labs/logger" "github.com/gin-gonic/gin" "github.com/go-resty/resty/v2" "github.com/stretchr/testify/assert" diff --git a/test/tcc_grpc_test.go b/test/tcc_grpc_test.go index 5c7757f..adc1b65 100644 --- a/test/tcc_grpc_test.go +++ b/test/tcc_grpc_test.go @@ -12,10 +12,10 @@ import ( "github.com/dtm-labs/dtm/client/dtmcli" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" "github.com/dtm-labs/dtm/client/dtmgrpc" "github.com/dtm-labs/dtm/dtmutil" "github.com/dtm-labs/dtm/test/busi" + "github.com/dtm-labs/logger" "github.com/stretchr/testify/assert" "google.golang.org/protobuf/types/known/emptypb" ) diff --git a/test/types.go b/test/types.go index 821f543..2f03260 100644 --- a/test/types.go +++ b/test/types.go @@ -12,11 +12,11 @@ import ( "github.com/dtm-labs/dtm/client/dtmcli" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" "github.com/dtm-labs/dtm/dtmsvr" "github.com/dtm-labs/dtm/dtmsvr/config" "github.com/dtm-labs/dtm/dtmutil" "github.com/dtm-labs/dtm/test/busi" + "github.com/dtm-labs/logger" "github.com/stretchr/testify/assert" ) diff --git a/test/workflow_http_test.go b/test/workflow_http_test.go index 59b9d55..850b1b6 100644 --- a/test/workflow_http_test.go +++ b/test/workflow_http_test.go @@ -12,9 +12,9 @@ import ( "github.com/dtm-labs/dtm/client/dtmcli" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" "github.com/dtm-labs/dtm/client/workflow" "github.com/dtm-labs/dtm/test/busi" + "github.com/dtm-labs/logger" "github.com/stretchr/testify/assert" ) diff --git a/test/workflow_ongoing_test.go b/test/workflow_ongoing_test.go index 4aa31c6..4d6dba4 100644 --- a/test/workflow_ongoing_test.go +++ b/test/workflow_ongoing_test.go @@ -12,10 +12,10 @@ import ( "github.com/dtm-labs/dtm/client/dtmcli" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" "github.com/dtm-labs/dtm/client/dtmgrpc/dtmgimp" "github.com/dtm-labs/dtm/client/workflow" "github.com/dtm-labs/dtm/test/busi" + "github.com/dtm-labs/logger" "github.com/stretchr/testify/assert" ) diff --git a/test/workflow_xa_test.go b/test/workflow_xa_test.go index 84030e6..dcf55b1 100644 --- a/test/workflow_xa_test.go +++ b/test/workflow_xa_test.go @@ -12,9 +12,9 @@ import ( "github.com/dtm-labs/dtm/client/dtmcli" "github.com/dtm-labs/dtm/client/dtmcli/dtmimp" - "github.com/dtm-labs/dtm/client/dtmcli/logger" "github.com/dtm-labs/dtm/client/workflow" "github.com/dtm-labs/dtm/test/busi" + "github.com/dtm-labs/logger" "github.com/stretchr/testify/assert" )