refactor(auth): migrate to zerolog structured logging
This commit is contained in:
@@ -10,7 +10,6 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"net"
|
||||
"net/http"
|
||||
"net/url"
|
||||
@@ -20,6 +19,8 @@ import (
|
||||
"runtime"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -246,7 +247,7 @@ func exchangeAuthCode(ctx context.Context, code, state, verifier string, port in
|
||||
return nil, fmt.Errorf("save credential: %w", err)
|
||||
}
|
||||
|
||||
log.Printf("login successful, credentials saved to %s", credPath)
|
||||
log.Info().Str("path", credPath).Msg("login successful, credentials saved")
|
||||
return cred, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user