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
|
@ -46,7 +46,7 @@ func initControlService(c *cfg) {
|
|||
|
||||
lis, err := net.Listen("tcp", endpoint)
|
||||
if err != nil {
|
||||
c.log.Error(logs.FrostFSNodeCantListenGRPCEndpointControl, zap.Error(err))
|
||||
c.log.Error(context.Background(), logs.FrostFSNodeCantListenGRPCEndpointControl, zap.Error(err))
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ func initControlService(c *cfg) {
|
|||
|
||||
c.workers = append(c.workers, newWorkerFromFunc(func(ctx context.Context) {
|
||||
runAndLog(ctx, c, serviceNameControl, false, func(context.Context, *cfg) {
|
||||
c.log.Info(logs.FrostFSNodeStartListeningEndpoint,
|
||||
c.log.Info(ctx, logs.FrostFSNodeStartListeningEndpoint,
|
||||
zap.String("service", serviceNameControl),
|
||||
zap.String("endpoint", endpoint))
|
||||
fatalOnErr(c.cfgControlService.server.Serve(lis))
|
||||
|
@ -113,6 +113,6 @@ func (c *cfg) notifySystemd(st control.HealthStatus) {
|
|||
err = sdnotify.Status(fmt.Sprintf("%v", st))
|
||||
}
|
||||
if err != nil {
|
||||
c.log.Error(logs.FailedToReportStatusToSystemd, zap.Error(err))
|
||||
c.log.Error(context.Background(), logs.FailedToReportStatusToSystemd, zap.Error(err))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue