.
This commit is contained in:
@@ -22,7 +22,7 @@ import (
|
||||
|
||||
func main() {
|
||||
config.CONFIG = *config.GetConfig()
|
||||
logging.SetupLogging()
|
||||
logging.SetupLogging(config.CONFIG.LogLevel)
|
||||
logger := logging.Logger
|
||||
ctx := logging.WithLogger(context.Background(), logger)
|
||||
err := runApp(ctx)
|
||||
@@ -42,9 +42,11 @@ func runApp(ctx context.Context) error {
|
||||
signals := make(chan os.Signal, 1)
|
||||
signal.Notify(signals, syscall.SIGINT, syscall.SIGTERM)
|
||||
|
||||
// Only this file should send to this channel.
|
||||
// All external functions should return errors.
|
||||
fatalErrors := make(chan error)
|
||||
|
||||
// Root server context, used to cancel
|
||||
// Root context, used to cancel
|
||||
// connections and graceful shutdown.
|
||||
serverCtx, cancel := context.WithCancel(ctx)
|
||||
defer cancel()
|
||||
|
||||
Reference in New Issue
Block a user