logs-fix
This commit is contained in:
parent
baeb5a68ea
commit
78930dc8f3
|
@ -27,23 +27,24 @@ func main() {
|
|||
cli.ARG_REDIS_URL = flag.String("redis_url", "", "Redis connection string")
|
||||
flag.Parse()
|
||||
|
||||
// global log level
|
||||
logrus.SetFormatter(&logs.LogTextFormatter{})
|
||||
|
||||
constants.VERSION = VERSION
|
||||
|
||||
// initialize logrus
|
||||
log := logs.InitLog(refs.StringValue(cli.ARG_LOG_LEVEL))
|
||||
|
||||
// set logrus formatter
|
||||
log.SetFormatter(&logs.LogTextFormatter{})
|
||||
|
||||
// initialize required envs (mainly db, env file path and redis)
|
||||
err := memorystore.InitRequiredEnv()
|
||||
if err != nil {
|
||||
logrus.Fatal("Error while initializing required envs: ", err)
|
||||
log.Fatal("Error while initializing required envs: ", err)
|
||||
}
|
||||
|
||||
log := logs.InitLog(refs.StringValue(cli.ARG_LOG_LEVEL))
|
||||
|
||||
// initialize memory store
|
||||
err = memorystore.InitMemStore()
|
||||
// initialize required envs (mainly db, env file path and redis)
|
||||
err := memorystore.InitRequiredEnv()
|
||||
if err != nil {
|
||||
log.Fatal("Error while initializing memory store: ", err)
|
||||
log.Fatal("Error while initializing required envs: ", err)
|
||||
}
|
||||
|
||||
// initialize db provider
|
||||
|
|
|
@ -321,7 +321,7 @@ func LoginResolver(ctx context.Context, params model.LoginInput) (*model.AuthRes
|
|||
// Assign the combined data to the provided pointer
|
||||
user.AppData = &appData
|
||||
} else {
|
||||
log.Printf("Error getting author's redis cache: %v", err)
|
||||
log.Errorf("Error getting author's redis cache: %v", err)
|
||||
}
|
||||
|
||||
res = &model.AuthResponse{
|
||||
|
|
|
@ -95,7 +95,7 @@ func SessionResolver(ctx context.Context, params *model.SessionQueryInput) (*mod
|
|||
// Assign the combined data to the provided pointer
|
||||
user.AppData = &appData
|
||||
} else {
|
||||
log.Printf("Error getting author's redis cache: %v", err)
|
||||
log.Errorf("Error getting author's redis cache: %v", err)
|
||||
}
|
||||
|
||||
res = &model.AuthResponse{
|
||||
|
|
Loading…
Reference in New Issue
Block a user