[#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:
parent
0371d15b2f
commit
942cc38146
1 changed files with 10 additions and 0 deletions
|
@ -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))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue