add new helper method to logger (#1273)

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2020-02-29 03:39:41 +03:00 committed by GitHub
parent d0a978bd50
commit 6b8930a960
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,3 +59,7 @@ func (h *Helper) Fatalf(template string, args ...interface{}) {
func (h *Helper) WithError(err error) *Helper {
return &Helper{h.Logger.Fields(map[string]interface{}{"error": err})}
}
func (h *Helper) WithFields(fields map[string]interface{}) *Helper {
return &Helper{h.Logger.Fields(fields)}
}