status-im / pluto

https://status-im.github.io/pluto/
12 stars 3 forks source link

Add trace facility #103

Closed jeluard closed 5 years ago

jeluard commented 5 years ago

As a developer I want an easy way to trace everything happening while an extension is running: event triggered (with arguments), query executed (with arguments and return type) and hooks lifecycle events.

(defn my-tracer [{:keys [id name type data]}]
  (println "Got " name " from " type))

(reader/parse {:tracer my-tracer} {'meta {}})