Skip to content

Commit

Permalink
fix: remove zap logger sync as loggers are by default unbuffered (#156)
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Heurich <theurichde@users.noreply.github.com>
  • Loading branch information
theurichde authored Nov 13, 2023
1 parent 81f92f3 commit 74a8df6
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions cmd/go-aws-sso/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package main

import (
"fmt"
"log"
"os"
"strings"
"time"
Expand Down Expand Up @@ -289,10 +288,6 @@ func initializeLogger(context *cli.Context) {
zapcore.NewCore(encoder, stdOut, infoLevel),
zapcore.NewCore(encoder, stdErr, errorFatalLevel))
logger := zap.New(core, options...)
err := logger.Sync()
if err != nil {
log.Fatalf("Error while initializing logger: %s)", err)
}
zap.ReplaceGlobals(logger)

zap.S().Debug("Debug logging enabled")
Expand Down

0 comments on commit 74a8df6

Please sign in to comment.