Macros to condition logging on the operative log level
Macros to condition logging on the operative log level
(apply-log-fn-at-level default log-fn level entry-type & args)
Returns value of log-fn
on entry-type
and args
as appropriate for level
, else return default
log-fn
is log! or value-log!, to be called only if appropriate for level.entry-type
is a keyword naming a type of entryargs
:= [<p> <o>, ...] for log!, [[<p> <o>, ...] <value>] for log-value!
These will only be evaluated if <level> is appropriatelevel
is the level of logging for the log statement, this may be overridden
by the level asserted for <entry-type>default
should be the value of <log-fn> if it's log-value!, typically nil
for log!Returns value of `log-fn` on `entry-type` and `args` as appropriate for `level`, else return `default` - Where - `log-fn` is log! or value-log!, to be called only if appropriate for level. - `entry-type` is a keyword naming a type of entry - `args` := [<p> <o>, ...] for log!, [[<p> <o>, ...] <value>] for log-value! These will only be evaluated if <level> is appropriate - `level` is the level of logging for the log statement, this may be overridden by the level asserted for <entry-type> - `default` should be the value of <log-fn> if it's log-value!, typically nil for log!
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close