forked from TrueCloudLab/frostfs-node
[#1437] node: Use ctx for logging
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
c16dae8b4d
commit
6db46257c0
157 changed files with 764 additions and 713 deletions
|
@ -61,7 +61,7 @@ var ErrNoHealthyEndpoint = errors.New("no healthy endpoint")
|
|||
func defaultConfig() *cfg {
|
||||
return &cfg{
|
||||
dialTimeout: defaultDialTimeout,
|
||||
logger: &logger.Logger{Logger: zap.L()},
|
||||
logger: logger.NewLoggerWrapper(zap.L()),
|
||||
metrics: morphmetrics.NoopRegister{},
|
||||
waitInterval: defaultWaitInterval,
|
||||
signer: &transaction.Signer{
|
||||
|
@ -130,10 +130,10 @@ func New(ctx context.Context, key *keys.PrivateKey, opts ...Option) (*Client, er
|
|||
for cli.endpoints.curr, endpoint = range cli.endpoints.list {
|
||||
cli.client, act, err = cli.newCli(ctx, endpoint)
|
||||
if err != nil {
|
||||
cli.logger.Warn(logs.FrostFSIRCouldntCreateRPCClientForEndpoint,
|
||||
cli.logger.Warn(ctx, logs.FrostFSIRCouldntCreateRPCClientForEndpoint,
|
||||
zap.Error(err), zap.String("endpoint", endpoint.Address))
|
||||
} else {
|
||||
cli.logger.Info(logs.FrostFSIRCreatedRPCClientForEndpoint,
|
||||
cli.logger.Info(ctx, logs.FrostFSIRCreatedRPCClientForEndpoint,
|
||||
zap.String("endpoint", endpoint.Address))
|
||||
if cli.endpoints.curr > 0 && cli.cfg.switchInterval != 0 {
|
||||
cli.switchIsActive.Store(true)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue