[#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>remotes/fyrchik/fix-error-counter
parent
0371d15b2f
commit
942cc38146
|
@ -24,3 +24,13 @@ func AddressField(addr interface{}) zap.Field {
|
||||||
func OpField(op string) zap.Field {
|
func OpField(op string) zap.Field {
|
||||||
return zap.String("op", op)
|
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))
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue