Liking cljdoc? Tell your friends :D

ont-app.graph-log.core


annotate!clj/s

(annotate! element & args)

Side-effect, adds args to entry for element in log-graph Where

  • args := [predicate object, ...]
  • element is an element of the log-graph
Side-effect, adds `args` to entry for `element` in log-graph
Where
  - `args` := [`predicate` `object`, ...]
  - `element` is an element of the log-graph
sourceraw docstring

archiving?clj/s

(archiving?)
(archiving? g)

True iff archiving is enabled for g Where:

  • g is an IGraph being used as a log-graph (default log-graph)
True iff archiving is enabled for `g`
Where:
- `g` is an IGraph being used as a log-graph (default [[log-graph]])
sourceraw docstring

compare-shared-entriesclj/s

(compare-shared-entries g1 g2)

Returns an IGraph containing content shared between g1 and g2 Where

  • g1, g2 are @log-graph's from two different sessions.
Returns an IGraph containing content shared between `g1` and `g2`
Where
  - `g1`, `g2` are @log-graph's from two different sessions.
sourceraw docstring

default-log-levelclj/s

source

empty-graphclj/s

source

entriesclj/s

(entries)
(entries entry-type)
(entries g entry-type)

Returns [entry-id, ...] for entry-type in g ordered by :glog/executionOrder Where

  • entry-id is a KWI identifying a log event in g
  • g is an optional IGraph supporting the logging ontology, (default log-graph) This is typically either the current log-graph or a copy of the log-grpah from a previous session.
  • entry-type is :all or the ID of some entry type.
Returns [`entry-id`, ...] for `entry-type` in `g` ordered by :glog/executionOrder
Where
- `entry-id` is a KWI identifying a log event in `g`
- `g` is an optional IGraph supporting the logging ontology, (default log-graph)
  This is typically either the current log-graph or a copy of the log-grpah
  from a previous session.
- `entry-type` is :all or the ID of some entry type.
sourceraw docstring

entry-countclj/s

(entry-count)
(entry-count g)

Returns the number of entries in g (default @log-graph)

Returns the number of entries in `g` (default @log-graph)
sourceraw docstring

find-divergenceclj/s

(find-divergence log1 log2)

Returns [same> [e1> e2>] forlog1andlog2` Where

  • same> := [shared-event>, ...]
  • e1>,e2> name events whose details differ between log1> andlog2>
  • log1>log2> are @log-graph's from two different sessions, typically reflecting some minor change in the same code base.
Returns [`same> [`e1> `e2>] for `log1` and `log2`
Where
  - `same> := [`shared-event>, ...]
  - `e1>, `e2> name events whose details differ between `log1> and `log2>
  - `log1> `log2> are @log-graph's from two different sessions, 
  typically reflecting some minor change in the same code base.
sourceraw docstring

ith-entryclj/s

(ith-entry i)
(ith-entry g i)

Returns [entry-id description] for ith execution order in g (default @graph-log) Where

  • entry-id is keyword naming the entry
  • description is the normal-form description of entry-id in g
  • g is a log-graph (@log-graph by default)
Returns [`entry-id` `description`] for ith execution order  in `g`
  (default @graph-log)
Where
- `entry-id` is keyword naming the entry
- `description` is the normal-form description of `entry-id` in `g`
- `g` is a log-graph (@log-graph by default)
sourceraw docstring

level-prioritiesclj/s

Caches level priorities, to inform level>=

Caches level priorities, to inform `level>=`
sourceraw docstring

level>=clj/s

(level>= this-level that-level)

Returns true iff this-level has priority >= that-level Where <this-level> e.g. :glog/INFO <that-level> e.g. :glog/DEBUG

Returns true iff `this-level` has priority >= `that-level`
Where
<this-level> e.g. :glog/INFO
<that-level> e.g. :glog/DEBUG
sourceraw docstring

log!clj/s

(log! entry-type & args)

Side-effect: adds an entry to log-graph for id minted per entry-type and args Returns: id or nil (if no entry was made) Where

  • id is a KWI minted for entry-type and whatever arg-kwis are of :rdf/type :glog/InformsUri in @log-graph.
  • entry-type is a KWI
  • args := [arg-kwi value, ...] Note: Any issues relating to log levels should be handled before calling this function.
Side-effect: adds an entry to log-graph for `id` minted per `entry-type` and `args`
Returns: `id` or nil (if no entry was made)
Where
- `id` is a KWI minted for `entry-type` and whatever `arg-kwi`s are of 
:rdf/type :glog/InformsUri in @log-graph.
- `entry-type` is a KWI
- `args` := [`arg-kwi` `value`, ...]
Note: Any issues relating to log levels should be handled before calling this
function.
sourceraw docstring

log-graphclj/s

source

log-reset!clj/s

(log-reset!)
(log-reset! initial-graph)

Side-effect: resets @log-graph to initial-graph Where

  • <initial-graph> is an IGraph, informed by ont-app.graph-log.core/ontology
    • optional. Default is core/ontology.
Side-effect: resets @log-graph to `initial-graph`
Where
- <initial-graph> is an IGraph, informed by ont-app.graph-log.core/ontology
  - optional. Default is core/ontology.
sourceraw docstring

log-value!clj/s

(log-value! entry-type value)
(log-value! entry-type other-args value)

Returns value Side effect: logs <id> :glog/value value, plus other-args into log-graph Where

  • entry-type is a keyword naming the type of entry
  • value is the value being logged before it's returned.
  • other-args := [p o, ...]
  • entry is an entry in @glog/log-graph
  • p is a keyword naming a property of entry
  • o is a value asserted for p s.t. [entry p o] in the log.
Returns `value`
Side effect: logs <id> :glog/value `value`, plus `other-args` into log-graph
Where
- `entry-type` is a keyword naming the type of `entry`
- `value` is the value being logged before it's returned.
- `other-args` := [`p` `o`, ...]
- `entry` is an entry in @glog/log-graph
- `p` is a keyword naming a property of `entry`
- `o` is a value asserted for `p` s.t. [`entry` `p` `o`] in the log.
sourceraw docstring

ontologyclj/s

source

query-logclj/s

(query-log q)
(query-log g q)

Returns [bmap, ....] for q posed to optional g Where

  • bmap := {var value, ...} bindings to q posed to g
  • q is a query in a format amenable to g
  • g is an IGraph supporting the graph-log vocabulary (default @log-graph)
Returns [`bmap`, ....] for `q` posed to optional `g`
Where
- `bmap` := {`var` `value`, ...} bindings to `q` posed to `g`
- `q` is a query in a format amenable to `g`
- `g` is an IGraph supporting the graph-log vocabulary (default @log-graph)
sourceraw docstring

remove-timestampsclj/s

(remove-timestamps)
(remove-timestamps g)

Spurious difference between two logs

Spurious difference between two logs
sourceraw docstring

remove-variant-valuesclj/s

(remove-variant-values)
(remove-variant-values g)

Returns g, removing/replacing values which would naturally vary between sessions. These would give rise to spurious differences between two otherwise identical logs. Timestamps are removed, and compiled objects are replaced with :compiled Where

  • g is an optional log-graph from the current or past sessions. Default is current @log-graph
Returns `g`, removing/replacing values which would naturally vary between sessions.
These would give rise to spurious differences between two otherwise identical
  logs. Timestamps are removed, and compiled objects are replaced with
  :compiled
Where
- `g` is an optional log-graph from the current or past sessions. Default
  is current @log-graph
sourceraw docstring

report-divergenceclj/s

(report-divergence g1 g2)
source

(search inc-or-dec entry-test g c found q)

Returns [c found [previous-index]] for entry-test of ith entry per q and inc-or-dec See also the IGraph docs for traversal functions.

Where

  • c is the (ignored) traversal context
  • found is nil or the first previous entry to pass test
  • previous-index decrements the head of q, or empty if found or i < 0
  • entry-test := fn [g entry] -> boolean
  • q := [entry or i [i] if still searching or [] if found. inc/dec-ing per iteration
  • i is the execution order to test
  • inc-or-dec :~ #{inc dec}, inc to search forward dec to search backward.
  • entry is the ith entry in g
  • g is a log-graph.
  • NOTE: typically this is used as a partial application over test (igraph/traverse log (partial search-backward test) nil [entry-id])
Returns [c found [previous-index]] for `entry-test` of `i`th  entry per `q` and inc-or-dec
  See also the IGraph docs for traversal functions.

  Where
  -  `c` is the (ignored) traversal context
  - `found` is nil or the first previous entry to pass `test`
  - `previous-index` decrements the head of `q`, or empty if found or `i` < 0
  - `entry-test` := fn [g entry] -> boolean
  - `q` := [`entry` or `i` [i] if still searching or [] if found. inc/dec-ing
    per iteration
  - `i` is the execution order to test
  - `inc-or-dec` :~ #{inc dec}, inc to search forward dec to search backward.
  - `entry` is the `i`th entry in `g`
  - `g` is a log-graph.
  - NOTE: typically this is used as a partial application over `test`
(igraph/traverse `log` (partial search-backward `test`)
                                 nil
                                 [`entry-id`])
sourceraw docstring

search-backwardclj/s

(search-backward test)
(search-backward test start)
(search-backward g test start)

Searches the log backward for a match to test, starting at start Where

  • test := fn [g entry] -> boolean
  • start is an integer indexing the (entries g) (default end of entries)
  • g is the log-graph
Searches the log backward for a match to `test`, starting at `start`
Where
- `test` := fn [g entry] -> boolean
- `start` is an integer indexing the (entries g) (default end of entries)
- `g` is the log-graph
sourceraw docstring

search-forwardclj/s

(search-forward test)
(search-forward test start)
(search-forward g test start)

Searches the log forward for a match to test starting at start Where

  • test := fn [g entry] -> boolean
  • start is an integer indexing (entries g) (default 0)
  • g is the log-graph
Searches the log forward for a match to `test` starting at `start`
Where
- `test` := fn [g entry] -> boolean
- `start` is an integer indexing (entries g) (default 0)
- `g` is the log-graph
sourceraw docstring

set-level!clj/s

(set-level! element level)

Side-effect, adds args to entry for element in log-graph Where

  • args := [predicate object, ...]
  • element is an element of the log-graph
Side-effect, adds `args` to entry for `element` in log-graph
Where
  - `args` := [`predicate` `object`, ...]
  - `element` is an element of the log-graph
sourceraw docstring

showclj/s

(show entry-id)
(show entry-id p)
(show entry-id p o)

Returns contents of entry-id for optional g Where

  • entry-id is the KWI of an entry
  • g is a log-graph (default @log-graph)
Returns contents of `entry-id` for optional `g` 
Where
- `entry-id` is the KWI of an entry
- `g` is a log-graph (default @log-graph)
sourceraw docstring

std-logging-messageclj/s

(std-logging-message & args)

Returns: a string suitable for standard logging based on args, or nil if there is no :glog/message specification. Where

  • args := {p o, ....}
  • p is a keyword naming a property, possibly :glog/message
  • o is a value, known as template if p = :glog/message
  • template is a mustache-style template to which desc-map will be applied Of the form `yadda {{<p>}} yadda...'
  • desc-map := {p o, ...}, minus any :glog/message. Specifying o's to be inserted into template.
Returns: a string suitable for standard logging based on `args`, or nil
  if there is no :glog/message specification.
Where
  - `args` := {`p` `o`, ....}
  - `p` is a keyword naming a property, possibly :glog/message
  - `o` is a value, known as `template` if `p` = :glog/message
  - `template` is a mustache-style template to which `desc-map` will be applied
  Of the form `yadda {{<p>}} yadda...'
  - `desc-map` := {`p` `o`, ...}, minus any :glog/message. Specifying `o`'s to be 
  inserted into `template`.
sourceraw docstring

theclj/s

source

timestampclj/s

(timestamp)
source

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

× close