Logging utilities that include performance logging. Parts pulled from Guaranteed-Rate/logdog open source project.
Logging utilities that include performance logging. Parts pulled from Guaranteed-Rate/logdog open source project.
(execution-time-logging-hook {:keys [level func-name msg msg-fn ns]
:or {level :info}})Given a config map, returns a hook function that logs execution time.
Given a config map, returns a hook function that logs execution time.
(log-execution-time! var-name)(log-execution-time! var-name opts)A macro for adding execution time logging to a named function. Simply call at the top level with the name of the function you want to wrap. As a second argument you may provide an options map with possible values:
{ :level ;; defaults to :info :msg ;; some string that is printed with the log messages :msg-fn ;; a function that will be called with the return value ;; and the arguments, and should return a message for ;; inclusion in the log }
A macro for adding execution time logging to a named
function. Simply call at the top level with the name of the function
you want to wrap. As a second argument you may provide an options
map with possible values:
{
:level ;; defaults to :info
:msg ;; some string that is printed with the log messages
:msg-fn ;; a function that will be called with the return value
;; and the arguments, and should return a message for
;; inclusion in the log
}cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |