[#1953] engine: Add refactored storage helpers

After the refactor there are new storage characteristics: a type and
a general storage id (that could be stringified).

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2022-10-21 20:50:33 +03:00 committed by fyrchik
parent 0371d15b2f
commit 942cc38146

View file

@ -24,3 +24,13 @@ func AddressField(addr interface{}) zap.Field {
func OpField(op string) zap.Field {
return zap.String("op", op)
}
// StorageTypeField returns logger's field for storage type.
func StorageTypeField(typ string) zap.Field {
return zap.String("type", typ)
}
// StorageIDField returns logger's field for storage ID.
func StorageIDField(id []byte) zap.Field {
return zap.String("storage_id", string(id))
}