Skip to content

Commit

Permalink
chore(BUX-200): refactor logs
Browse files Browse the repository at this point in the history
  • Loading branch information
pawellewandowski98 committed Dec 13, 2023
1 parent b18d088 commit 001c5e2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
4 changes: 2 additions & 2 deletions actions/graphql/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ func RegisterRoutes(router *apirouter.Router, appConfig *config.AppConfig, servi
),
)
if appConfig.Debug {
services.Logger.Debug().Msg("started graphql playground server on " + playgroundPath)
services.Logger.Debug().Msgf("started graphql playground server on %s", playgroundPath)
}
} else {
services.Logger.Error().Msg("Failed starting graphql playground server directory equals playground directory " + serverPath + " = " + playgroundPath)
services.Logger.Error().Msgf("Failed starting graphql playground server directory equals playground directory %s = %s", serverPath, playgroundPath)
}
}

Expand Down
20 changes: 9 additions & 11 deletions cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package main

import (
"context"
"fmt"
"os"
"os/signal"
"time"
Expand Down Expand Up @@ -51,16 +50,15 @@ func main() {

// (debugging: show services that are enabled or not)
if appConfig.Debug {
services.Logger.Debug().Msg(
fmt.Sprintf("datastore: %s | cachestore: %s | taskmanager: %s [%s] | new_relic: %t | paymail: %t | graphql: %t",
appConfig.Datastore.Engine.String(),
appConfig.Cachestore.Engine.String(),
appConfig.TaskManager.Engine.String(),
appConfig.TaskManager.Factory.String(),
appConfig.NewRelic.Enabled,
appConfig.Paymail.Enabled,
appConfig.GraphQL.Enabled,
),
services.Logger.Debug().Msgf(
"datastore: %s | cachestore: %s | taskmanager: %s [%s] | new_relic: %t | paymail: %t | graphql: %t",
appConfig.Datastore.Engine.String(),
appConfig.Cachestore.Engine.String(),
appConfig.TaskManager.Engine.String(),
appConfig.TaskManager.Factory.String(),
appConfig.NewRelic.Enabled,
appConfig.Paymail.Enabled,
appConfig.GraphQL.Enabled,
)
}

Expand Down

0 comments on commit 001c5e2

Please sign in to comment.