forked from TrueCloudLab/frostfs-node
[#240] logs: Move log messages to constants
Drop duplicate entities. Format entities. Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com> Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
d29b13454f
commit
0e31c12e63
149 changed files with 1481 additions and 687 deletions
|
@ -4,6 +4,7 @@ import (
|
|||
"crypto/elliptic"
|
||||
"fmt"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/internal/logs"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/client/frostfsid"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/event/frostfs"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/user"
|
||||
|
@ -20,7 +21,7 @@ type bindCommon interface {
|
|||
|
||||
func (np *Processor) processBind(e bindCommon) {
|
||||
if !np.alphabetState.IsAlphabet() {
|
||||
np.log.Info("non alphabet mode, ignore bind")
|
||||
np.log.Info(logs.FrostFSNonAlphabetModeIgnoreBind)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -32,7 +33,7 @@ func (np *Processor) processBind(e bindCommon) {
|
|||
|
||||
err := np.checkBindCommon(c)
|
||||
if err != nil {
|
||||
np.log.Error("invalid manage key event",
|
||||
np.log.Error(logs.FrostFSInvalidManageKeyEvent,
|
||||
zap.Bool("bind", c.bind),
|
||||
zap.String("error", err.Error()),
|
||||
)
|
||||
|
@ -77,7 +78,7 @@ func (np *Processor) approveBindCommon(e *bindCommonContext) {
|
|||
|
||||
u160, err := util.Uint160DecodeBytesBE(scriptHash)
|
||||
if err != nil {
|
||||
np.log.Error("could not decode script hash from bytes",
|
||||
np.log.Error(logs.FrostFSCouldNotDecodeScriptHashFromBytes,
|
||||
zap.String("error", err.Error()),
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue