Liking cljdoc? Tell your friends :D

ont-app.graph-log.levels

clj

Macros to condition logging on the operative log level

Macros to condition logging on the operative log level
raw docstring

apply-log-fn-at-levelclj/smacro

(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

  • 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!

VOCABULARY:

  • :glog/LogGraph - names @log-graph in @log-graph
  • :glog/OFF - names the logging level that switches logging off
  • <log graph or entry> :glog/level <logging level>
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!

VOCABULARY:
- `:glog/LogGraph` - names @log-graph in @log-graph
- `:glog/OFF` - names the logging level that switches logging off
- <log graph or entry> `:glog/level` <logging level>
sourceraw docstring

apply-std-logging-fn-at-levelclj/smacro

(apply-std-logging-fn-at-level val level & args)

Expands to an expression that checks level logging configuration, and prints a message to standard logging as appropriate. :glog/message statements will be posted to standard logging regardless of whether the is a @log-graph or not. Where

  • val is the value to be logged (or nil if we're not tracing the value of a form
  • level is a :glog/Level
  • args are glog logging args appropriate to glog/std-logging-message
Expands to an expression that checks `level` logging configuration, and prints a message to standard logging as appropriate. `:glog/message` statements will be posted to standard logging regardless of whether the is a @`log-graph` or not.
Where
- `val` is the value to be logged (or nil if we're not tracing the value of a form
- `level` is a `:glog/Level`
- `args` are glog logging args appropriate to `glog/std-logging-message`
sourceraw docstring

debugclj/smacro

(debug entry-type & args)

Marks entry-type as logging-level :glog/DEBUG

Marks `entry-type` as logging-level :glog/DEBUG
sourceraw docstring

errorclj/smacro

(error entry-type & args)

Marks entry-type as logging-level :glog/ERROR

Marks `entry-type` as logging-level :glog/ERROR
sourceraw docstring

fatalclj/smacro

(fatal entry-type & args)

Marks entry-type as logging-level :glog/FATAL

Marks `entry-type` as logging-level :glog/FATAL
sourceraw docstring

infoclj/smacro

(info entry-type & args)

Marks entry-type as logging-level :glog/INFO

Marks `entry-type` as logging-level :glog/INFO
sourceraw docstring

traceclj/smacro

(trace entry-type & args)

Marks entry-type as logging-level :glog/TRACE

Marks `entry-type` as logging-level :glog/TRACE
sourceraw docstring

value-debugclj/smacro

(value-debug entry-type val)
(value-debug entry-type extras val)

Logs value of a form with logging level :glog/DEBUG

Logs value of a form with logging level :glog/DEBUG
sourceraw docstring

value-errorclj/smacro

(value-error entry-type val)
(value-error entry-type extras val)

Logs value of a form with logging level :glog/ERROR

Logs value of a form with logging level :glog/ERROR
sourceraw docstring

value-fatalclj/smacro

(value-fatal entry-type val)
(value-fatal entry-type extras val)

Logs value of a form with logging level :glog/FATAL

Logs value of a form with logging level :glog/FATAL
sourceraw docstring

value-infoclj/smacro

(value-info entry-type val)
(value-info entry-type extras val)

Logs value of a form with logging level :glog/INFO

Logs value of a form with logging level :glog/INFO
sourceraw docstring

value-traceclj/smacro

(value-trace entry-type val)
(value-trace entry-type extras val)

Logs value of a form with logging level :glog/TRACE

Logs value of a form with logging level :glog/TRACE
sourceraw docstring

value-warnclj/smacro

(value-warn entry-type val)
(value-warn entry-type extras val)

Logs value of a form with logging level :glog/WARN

Logs value of a form with logging level :glog/WARN
sourceraw docstring

warnclj/smacro

(warn entry-type & args)

Marks entry-type as logging-level :glog/WARN

Marks `entry-type` as logging-level :glog/WARN
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close