Functional logging mechanism
Functional logging mechanism
(clean-fork src child-context)
Fork the context/lamport clock without the logs.
Main use-case is exception handlers in weird side-effecty places where it isn't convenient to propagate a log line or 2 that will show up later.
Fork the context/lamport clock without the logs. Main use-case is exception handlers in weird side-effecty places where it isn't convenient to propagate a log line or 2 that will show up later.
(debug log-state__1086__auto__ label__1087__auto__)
(debug log-state__1086__auto__ label__1087__auto__ message__1088__auto__)
(debug log-state__1086__auto__
label__1087__auto__
message__1088__auto__
details__1089__auto__)
(debug log-state__6316__auto__ label__6317__auto__)
(debug log-state__6316__auto__ label__6317__auto__ message__6318__auto__)
(debug log-state__6316__auto__
label__6317__auto__
message__6318__auto__
details__6319__auto__)
(do-sync-clock log-state)
Synchronize my clock with a state's
Synchronize my clock with a state's
(error log-state__1086__auto__ label__1087__auto__)
(error log-state__1086__auto__ label__1087__auto__ message__1088__auto__)
(error log-state__1086__auto__
label__1087__auto__
message__1088__auto__
details__1089__auto__)
(error log-state__6316__auto__ label__6317__auto__)
(error log-state__6316__auto__ label__6317__auto__ message__6318__auto__)
(error log-state__6316__auto__
label__6317__auto__
message__6318__auto__
details__6319__auto__)
(exception log-state ex label)
(exception log-state ex label message)
(exception log-state ex label message original-details)
(fatal log-state__1086__auto__ label__1087__auto__)
(fatal log-state__1086__auto__ label__1087__auto__ message__1088__auto__)
(fatal log-state__1086__auto__
label__1087__auto__
message__1088__auto__
details__1089__auto__)
(fatal log-state__6316__auto__ label__6317__auto__)
(fatal log-state__6316__auto__ label__6317__auto__ message__6318__auto__)
(fatal log-state__6316__auto__
label__6317__auto__
message__6318__auto__
details__6319__auto__)
(flush-logs! logger {:keys [:frereth.weald/context] :as log-state})
For the side-effects to write the accumulated logs.
Returns a fresh set of log entries
For the side-effects to write the accumulated logs. Returns a fresh set of log entries
(fork src)
(fork src child-context)
Return shape depends on arity
Return shape depends on arity
(info log-state__1086__auto__ label__1087__auto__)
(info log-state__1086__auto__ label__1087__auto__ message__1088__auto__)
(info log-state__1086__auto__
label__1087__auto__
message__1088__auto__
details__1089__auto__)
(info log-state__6316__auto__ label__6317__auto__)
(info log-state__6316__auto__ label__6317__auto__ message__6318__auto__)
(info log-state__6316__auto__
label__6317__auto__
message__6318__auto__
details__6319__auto__)
Extend this for logging side-effects
Extend this for logging side-effects
(log! this msg)
At least queue up a log message to side-effect
At least queue up a log message to side-effect
(flush! this)
Some loggers need to do this at the end of a batch
Some loggers need to do this at the end of a batch
(merge-entries xs ys)
Note that this is a relatively expensive operation
Note that this is a relatively expensive operation
(merge-state x y)
Combine the entries of two log states
This is mostly meant for logs that have diverged from the same context.
Combine the entries of two log states This is mostly meant for logs that have diverged from the same context.
(synchronize
{l-clock :frereth.weald/lamport l-ctx :frereth.weald/context :as lhs}
{r-clock :frereth.weald/lamport r-ctx :frereth.weald/context :as rhs})
Fix 2 clocks that have probably drifted apart
Fix 2 clocks that have probably drifted apart
(trace log-state__1086__auto__ label__1087__auto__)
(trace log-state__1086__auto__ label__1087__auto__ message__1088__auto__)
(trace log-state__1086__auto__
label__1087__auto__
message__1088__auto__
details__1089__auto__)
(trace log-state__6316__auto__ label__6317__auto__)
(trace log-state__6316__auto__ label__6317__auto__ message__6318__auto__)
(trace log-state__6316__auto__
label__6317__auto__
message__6318__auto__
details__6319__auto__)
(warn log-state__1086__auto__ label__1087__auto__)
(warn log-state__1086__auto__ label__1087__auto__ message__1088__auto__)
(warn log-state__1086__auto__
label__1087__auto__
message__1088__auto__
details__1089__auto__)
(warn log-state__6316__auto__ label__6317__auto__)
(warn log-state__6316__auto__ label__6317__auto__ message__6318__auto__)
(warn log-state__6316__auto__
label__6317__auto__
message__6318__auto__
details__6319__auto__)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close