Remove println and replace it with our logging

This commit is contained in:
2023-10-07 14:13:29 +01:00
parent 39d3afdd05
commit 8673f1caf8
7 changed files with 25 additions and 5 deletions
+3
View File
@@ -2,6 +2,7 @@ package main
import (
"github.com/gookit/goutil/envutil"
graphql "github.com/lukaszraczylo/go-simple-graphql"
libpack_config "github.com/telegram-bot-app/libpack/config"
libpack_logging "github.com/telegram-bot-app/libpack/logging"
)
@@ -18,6 +19,8 @@ func parseConfig() {
c.Cache.CacheEnable = envutil.GetBool("CACHE_ENABLE", false)
c.Cache.CacheTTL = envutil.GetInt("CACHE_TTL", 60)
c.Logger = libpack_logging.NewLogger()
c.Client.GQLClient = graphql.NewConnection()
c.Client.GQLClient.SetEndpoint(c.Server.HostGraphQL)
cfg = &c
enableCache() // takes close to no resources, but can be used with dynamic query cache
}