Functional logging mechanism
Functional logging mechanism
(atomically! log-atom log-fn & args)
Accumulate log messages into an atom
This can frequently be more convenient than returning the updated state.
Accumulate log messages into an atom This can frequently be more convenient than returning the updated state.
(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__1133__auto__ label__1134__auto__)
(debug log-state__1133__auto__ label__1134__auto__ message__1135__auto__)
(debug log-state__1133__auto__
label__1134__auto__
message__1135__auto__
details__1136__auto__)
(debug log-state__5271__auto__ label__5272__auto__)
(debug log-state__5271__auto__ label__5272__auto__ message__5273__auto__)
(debug log-state__5271__auto__
label__5272__auto__
message__5273__auto__
details__5274__auto__)
(do-sync-clock remote-lamport)
Synchronize my clock with another's
Low-level function used to build do-synchronize-clock-with-state
Synchronize my clock with another's Low-level function used to build do-synchronize-clock-with-state
(do-synchronize-clock-with-state state)
Coordinate state's clock with our internal counter
Coordinate state's clock with our internal counter
(error log-state__1133__auto__ label__1134__auto__)
(error log-state__1133__auto__ label__1134__auto__ message__1135__auto__)
(error log-state__1133__auto__
label__1134__auto__
message__1135__auto__
details__1136__auto__)
(error log-state__5271__auto__ label__5272__auto__)
(error log-state__5271__auto__ label__5272__auto__ message__5273__auto__)
(error log-state__5271__auto__
label__5272__auto__
message__5273__auto__
details__5274__auto__)
(exception log-state ex label)
(exception log-state ex label message)
(exception log-state ex label message original-details)
(fatal log-state__1133__auto__ label__1134__auto__)
(fatal log-state__1133__auto__ label__1134__auto__ message__1135__auto__)
(fatal log-state__1133__auto__
label__1134__auto__
message__1135__auto__
details__1136__auto__)
(fatal log-state__5271__auto__ label__5272__auto__)
(fatal log-state__5271__auto__ label__5272__auto__ message__5273__auto__)
(fatal log-state__5271__auto__
label__5272__auto__
message__5273__auto__
details__5274__auto__)
(flush-atomically! logger log-atom)
Flush an accumulation of log messages
Flush an accumulation of log messages
(flush-logs! logger {:keys [:frereth.weald.specs/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__1133__auto__ label__1134__auto__)
(info log-state__1133__auto__ label__1134__auto__ message__1135__auto__)
(info log-state__1133__auto__
label__1134__auto__
message__1135__auto__
details__1136__auto__)
(info log-state__5271__auto__ label__5272__auto__)
(info log-state__5271__auto__ label__5272__auto__ message__5273__auto__)
(info log-state__5271__auto__
label__5272__auto__
message__5273__auto__
details__5274__auto__)
(merge-entries xs ys)
Combine entries from two sets of logs
Note that this is a relatively expensive operation
Combine entries from two sets of logs 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.specs/lamport
l-ctx :frereth.weald.specs/context
:as lhs}
{r-clock :frereth.weald.specs/lamport
r-ctx :frereth.weald.specs/context
:as rhs})
Fix 2 clocks that have probably drifted apart
Fix 2 clocks that have probably drifted apart
(trace log-state__1133__auto__ label__1134__auto__)
(trace log-state__1133__auto__ label__1134__auto__ message__1135__auto__)
(trace log-state__1133__auto__
label__1134__auto__
message__1135__auto__
details__1136__auto__)
(trace log-state__5271__auto__ label__5272__auto__)
(trace log-state__5271__auto__ label__5272__auto__ message__5273__auto__)
(trace log-state__5271__auto__
label__5272__auto__
message__5273__auto__
details__5274__auto__)
(warn log-state__1133__auto__ label__1134__auto__)
(warn log-state__1133__auto__ label__1134__auto__ message__1135__auto__)
(warn log-state__1133__auto__
label__1134__auto__
message__1135__auto__
details__1136__auto__)
(warn log-state__5271__auto__ label__5272__auto__)
(warn log-state__5271__auto__ label__5272__auto__ message__5273__auto__)
(warn log-state__5271__auto__
label__5272__auto__
message__5273__auto__
details__5274__auto__)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close