kithara.middlewares.logging

wrap-logging

(wrap-logging message-handler consumer-name)

Wrap the given function, taking a kithara message map and producing a confirmation map, to log messages on error/exceptions. The message will have the following format:

[<consumer-name>] [<consumer-tag>] [<status>] ... details ...

This is a middleware activated by default in the kithara base consumer.