Alex Vanin
20de74a505
Due to source code relocation from GitHub. Signed-off-by: Alex Vanin <a.vanin@yadro.com>
24 lines
767 B
Go
24 lines
767 B
Go
package util
|
|
|
|
import (
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/network"
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/util/logger"
|
|
"go.uber.org/zap"
|
|
)
|
|
|
|
// LogServiceError writes error message of object service to provided logger.
|
|
func LogServiceError(l *logger.Logger, req string, node network.AddressGroup, err error) {
|
|
l.Error("object service error",
|
|
zap.String("node", network.StringifyGroup(node)),
|
|
zap.String("request", req),
|
|
zap.String("error", err.Error()),
|
|
)
|
|
}
|
|
|
|
// LogWorkerPoolError writes debug error message of object worker pool to provided logger.
|
|
func LogWorkerPoolError(l *logger.Logger, req string, err error) {
|
|
l.Error("could not push task to worker pool",
|
|
zap.String("request", req),
|
|
zap.String("error", err.Error()),
|
|
)
|
|
}
|