抽离 logger
This commit is contained in:
parent
1037ae3923
commit
0e3f8380f0
@ -4,10 +4,10 @@ import (
|
|||||||
"github.com/fsnotify/fsnotify"
|
"github.com/fsnotify/fsnotify"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
"matrix-common/constants"
|
"matrix-common/constants"
|
||||||
|
"matrix-common/pkg/logger"
|
||||||
_ "matrix-middle-service/docs"
|
_ "matrix-middle-service/docs"
|
||||||
"matrix-middle-service/internel/app"
|
"matrix-middle-service/internel/app"
|
||||||
"matrix-middle-service/pkg/config/toml"
|
"matrix-middle-service/pkg/config/toml"
|
||||||
"matrix-middle-service/pkg/logger"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Main() {
|
func Main() {
|
||||||
|
@ -4,11 +4,11 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
"matrix-common/pkg/logger"
|
||||||
"matrix-middle-service/internel/middleware"
|
"matrix-middle-service/internel/middleware"
|
||||||
"matrix-middle-service/internel/route"
|
"matrix-middle-service/internel/route"
|
||||||
"matrix-middle-service/pkg/config"
|
"matrix-middle-service/pkg/config"
|
||||||
"matrix-middle-service/pkg/database"
|
"matrix-middle-service/pkg/database"
|
||||||
"matrix-middle-service/pkg/logger"
|
|
||||||
fib "matrix-middle-service/pkg/utils/fiber"
|
fib "matrix-middle-service/pkg/utils/fiber"
|
||||||
"matrix-middle-service/pkg/utils/nanoid"
|
"matrix-middle-service/pkg/utils/nanoid"
|
||||||
"matrix-middle-service/pkg/utils/sonyflake"
|
"matrix-middle-service/pkg/utils/sonyflake"
|
||||||
|
@ -2,10 +2,10 @@ package location
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
|
"matrix-common/pkg/logger"
|
||||||
"matrix-middle-service/internel/controller/record/location/dto"
|
"matrix-middle-service/internel/controller/record/location/dto"
|
||||||
"matrix-middle-service/pkg/database"
|
"matrix-middle-service/pkg/database"
|
||||||
"matrix-middle-service/pkg/database/model"
|
"matrix-middle-service/pkg/database/model"
|
||||||
"matrix-middle-service/pkg/logger"
|
|
||||||
response "matrix-middle-service/pkg/resp"
|
response "matrix-middle-service/pkg/resp"
|
||||||
"matrix-middle-service/pkg/resp/errorx"
|
"matrix-middle-service/pkg/resp/errorx"
|
||||||
utils "matrix-middle-service/pkg/utils/json"
|
utils "matrix-middle-service/pkg/utils/json"
|
||||||
|
@ -2,7 +2,7 @@ package route
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
"matrix-middle-service/pkg/logger"
|
"matrix-common/pkg/logger"
|
||||||
"matrix-middle-service/pkg/resp/errorx"
|
"matrix-middle-service/pkg/resp/errorx"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
_ "matrix-common/pkg/logger"
|
||||||
"matrix-middle-service/cmd/service"
|
"matrix-middle-service/cmd/service"
|
||||||
_ "matrix-middle-service/pkg/database/driver/mysql"
|
_ "matrix-middle-service/pkg/database/driver/mysql"
|
||||||
_ "matrix-middle-service/pkg/logger"
|
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -2,10 +2,10 @@ package database
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/mitchellh/mapstructure"
|
"github.com/mitchellh/mapstructure"
|
||||||
|
"matrix-common/pkg/logger"
|
||||||
"matrix-middle-service/internel/controller/record/location/dto"
|
"matrix-middle-service/internel/controller/record/location/dto"
|
||||||
"matrix-middle-service/pkg/config/database"
|
"matrix-middle-service/pkg/config/database"
|
||||||
"matrix-middle-service/pkg/database/model"
|
"matrix-middle-service/pkg/database/model"
|
||||||
"matrix-middle-service/pkg/logger"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var SupportDataSources = make(map[string]InitDSFn)
|
var SupportDataSources = make(map[string]InitDSFn)
|
||||||
|
@ -7,12 +7,12 @@ import (
|
|||||||
_ "github.com/go-sql-driver/mysql"
|
_ "github.com/go-sql-driver/mysql"
|
||||||
"github.com/gookit/goutil/strutil"
|
"github.com/gookit/goutil/strutil"
|
||||||
"github.com/mitchellh/mapstructure"
|
"github.com/mitchellh/mapstructure"
|
||||||
|
"matrix-common/pkg/logger"
|
||||||
"matrix-middle-service/internel/controller/record/location/dto"
|
"matrix-middle-service/internel/controller/record/location/dto"
|
||||||
database2 "matrix-middle-service/pkg/config/database"
|
database2 "matrix-middle-service/pkg/config/database"
|
||||||
"matrix-middle-service/pkg/database"
|
"matrix-middle-service/pkg/database"
|
||||||
"matrix-middle-service/pkg/database/driver/mysql/conf"
|
"matrix-middle-service/pkg/database/driver/mysql/conf"
|
||||||
"matrix-middle-service/pkg/database/model"
|
"matrix-middle-service/pkg/database/model"
|
||||||
"matrix-middle-service/pkg/logger"
|
|
||||||
fib "matrix-middle-service/pkg/utils/fiber"
|
fib "matrix-middle-service/pkg/utils/fiber"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
@ -2,8 +2,8 @@ package nanoid
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
gonanoid "github.com/matoous/go-nanoid"
|
gonanoid "github.com/matoous/go-nanoid"
|
||||||
|
"matrix-common/pkg/logger"
|
||||||
"matrix-middle-service/pkg/config/nanoid"
|
"matrix-middle-service/pkg/config/nanoid"
|
||||||
"matrix-middle-service/pkg/logger"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var config *nanoid.Config
|
var config *nanoid.Config
|
||||||
|
@ -3,8 +3,8 @@ package sonyflake
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/sony/sonyflake"
|
"github.com/sony/sonyflake"
|
||||||
|
"matrix-common/pkg/logger"
|
||||||
sf "matrix-middle-service/pkg/config/sonyflake"
|
sf "matrix-middle-service/pkg/config/sonyflake"
|
||||||
"matrix-middle-service/pkg/logger"
|
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user