Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Backend) Refactor Logger Implementation using logrus #64

Merged
merged 14 commits into from
Nov 10, 2023
Merged
3 changes: 3 additions & 0 deletions backend/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ KAFKA_HORIZON_PRODUCER_TOPIC=
KAFKA_HORIZON_CONSUMER_TOPICS=
KAFKA_SCHEMA_REGISTRY_URL=

# Log
LOG_LEVEL=debug

# HTTP
HTTP_PORT=
HTTP_FRONT_ADRESS=
Expand Down
5 changes: 5 additions & 0 deletions backend/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ type (
HTTP HTTP
JWT JWT
Horizon Horizon
Log Log
}

Log struct {
Level string `env-required:"true" env:"LOG_LEVEL" env-default:"info"`
}

KafkaConfig struct {
Expand Down
39 changes: 22 additions & 17 deletions backend/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,39 +11,41 @@ require (
github.com/ilyakaznacheev/cleanenv v1.5.0
github.com/joho/godotenv v1.5.1
github.com/lib/pq v1.10.9
github.com/pelletier/go-toml/v2 v2.0.9
github.com/pelletier/go-toml/v2 v2.1.0
github.com/rs/zerolog v1.31.0
github.com/stretchr/testify v1.8.4
github.com/swaggo/files v1.0.1
github.com/swaggo/gin-swagger v1.6.0
github.com/swaggo/swag v1.16.1
golang.org/x/crypto v0.11.0
github.com/swaggo/swag v1.16.2
golang.org/x/crypto v0.14.0
)

require (
github.com/Eun/go-convert v1.2.12 // indirect
github.com/Eun/go-doppelgangerreader v0.0.0-20220728163552-459d94705224 // indirect
github.com/KyleBanks/depth v1.2.1 // indirect
github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de // indirect
github.com/bytedance/sonic v1.10.0-rc2 // indirect
github.com/bahlo/generic-list-go v0.2.0 // indirect
github.com/buger/jsonparser v1.1.1 // indirect
github.com/bytedance/sonic v1.10.2 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect
github.com/chenzhuoyu/iasm v0.9.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-openapi/jsonpointer v0.20.0 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/spec v0.20.9 // indirect
github.com/go-openapi/swag v0.22.4 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.14.1 // indirect
github.com/go-playground/validator/v10 v10.15.5 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/gookit/color v1.5.4 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/iancoleman/orderedmap v0.3.0 // indirect
github.com/invopop/jsonschema v0.7.0 // indirect
github.com/invopop/jsonschema v0.12.0 // indirect
github.com/itchyny/gojq v0.12.13 // indirect
github.com/itchyny/timefmt-go v0.1.5 // indirect
github.com/josharian/intern v1.0.0 // indirect
Expand All @@ -54,30 +56,33 @@ require (
github.com/lunixbochs/vtclean v1.0.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
go.uber.org/atomic v1.11.0 // indirect
golang.org/x/arch v0.4.0 // indirect
golang.org/x/net v0.12.0 // indirect
golang.org/x/sys v0.10.0 // indirect
golang.org/x/text v0.11.0 // indirect
golang.org/x/tools v0.11.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
golang.org/x/arch v0.5.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/tools v0.14.0 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
google.golang.org/protobuf v1.31.0 // indirect
)

require (
github.com/BurntSushi/toml v1.3.2 // indirect
github.com/Eun/go-hit v0.5.23
github.com/bitly/go-notify v0.0.0-20130217044602-0a148b8111d6
github.com/gin-gonic/contrib v0.0.0-20221130124618-7e01895a63f2
github.com/sirupsen/logrus v1.9.3
github.com/vearne/gin-timeout v0.1.7
gopkg.in/yaml.v3 v3.0.1 // indirect
olympos.io/encoding/edn v0.0.0-20201019073823-d3554ca0b0a3 // indirect
)
Loading