{:group-id "com.taoensso.debug", :artifact-id "telemere", :version "1.0.0-beta1-f01", :analysis {"clj" ({:author "Peter Taoussanis (@ptaoussanis)", :name taoensso.telemere, :publics ({:name *ctx*, :file "taoensso/telemere.cljc", :line 121, :dynamic true, :doc "Dynamic context: arbitrary user-level state attached as `:ctx` to all signals.\nValue may be any type, but is usually nil or a map.\n\nRe/bind dynamic value using `with-ctx`, `with-ctx+`, or `binding`.\nModify root (base) value using `set-ctx!`.\nDefault root (base) value is `default-ctx`.\n\nNote that as with all dynamic Clojure vars, \"binding conveyance\" applies\nwhen using futures, agents, etc.\n\nTips:\n - Value may be (or may contain) an atom if you want mutable semantics\n - Value may be of form { } for custom scoping, etc.", :type :var} {:name *middleware*, :file "taoensso/telemere.cljc", :line 166, :dynamic true, :doc "Optional vector of unary middleware fns to apply (sequentially/left-to-right)\nto each signal before passing it to handlers. If any middleware fn returns nil,\naborts immediately without calling handlers.\n\nUseful for transforming each signal before handling.\n\nRe/bind dynamic value using `with-middleware`, `binding`.\nModify root (base) value using `set-middleware!`.", :type :var} {:name add-handler!, :file "taoensso/telemere.cljc", :line 49, :arglists ([handler-id handler-fn] [handler-id handler-fn dispatch-opts]), :doc "Registers given signal handler and returns\n{ {:keys [dispatch-opts handler-fn]}} for all signal handlers\nnow registered.\n\n`handler-fn` should be a fn of 1-2 arities:\n\n ([handler-arg]) => Handle the given argument (e.g. write to disk/db, etc.)\n ([]) => Optional arity, called exactly once on system shutdown.\n Provides an opportunity for handler to close/release\n any resources that it may have opened/acquired.\n\nSee the relevant docstring/s for `handler-arg` details.\n\nHandler ideas:\n\n Save to a db, `tap>`, log, `put!` to an appropriate `core.async`\n channel, filter, aggregate, use for a realtime analytics dashboard,\n examine for outliers or unexpected data, etc.\n\nDispatch options include:\n\n `async` (Clj only)\n Options for running handler asynchronously via `taoensso.encore/runner`,\n {:keys [mode buffer-size n-threads daemon-threads? ...]}\n\n Supports `:blocking`, `:dropping`, and `:sliding` back-pressure modes.\n NB handling order may be non-sequential when `n-threads` > 1.\n\n Default:\n {:mode :dropping, :buffer-size 4096, :n-threads 1, :daemon-threads? false}\n\n Options:\n `mode` - Mode of operation, ∈ #{:sync :blocking :dropping :sliding}.\n `buffer-size` - Size of buffer before back-pressure mechanism is engaged.\n `n-threads` - Number of threads for asynchronously executing fns.\n NB execution order may be non-sequential when n > 1.\n\n `priority`\n Optional handler priority ∈ℤ (default 100). Handlers will be called in\n descending priority order.\n\n `sample-rate`\n Optional sample rate ∈ℝ[0,1], or (fn dyamic-sample-rate []) => ℝ[0,1].\n When present, handle only this (random) proportion of args:\n 1.0 => handle every arg (same as `nil` rate, default)\n 0.0 => noop every arg\n 0.5 => handle random 50% of args\n\n `kind-filter` - Kind filter as in `set-kind-filter!` (when relevant)\n `ns-filter` - Namespace filter as in `set-ns-filter!`\n `id-filter` - Id filter as in `set-id-filter!` (when relevant)\n `min-level` - Minimum level as in `set-min-level!`\n\n `when-fn`\n Optional nullary (fn allow? []) that must return truthy for handler to be\n called. When present, called *after* sampling and other filters, but before\n rate limiting.\n\n `rate-limit`\n Optional rate limit spec as provided to `taoensso.encore/rate-limiter`,\n { [ ]}.\n\n Examples:\n {\"1/sec\" [1 1000]} => Max 1 call per 1000 msecs\n {\"1/sec\" [1 1000]\n \"10/min\" [10 60000]} => Max 1 call per 1000 msecs,\n and 10 calls per 60 secs\n\n `middleware`\n Optional vector of unary middleware fns to apply (left-to-right/sequentially)\n to `handler-arg` before passing to `handler-fn`. If any middleware fn returns\n nil, aborts immediately without calling `handler-fn`.\n\n Useful for transforming `handler-arg` before handling.\n\n `error-fn` - (fn [{:keys [handler-id handler-arg error]}]) to call on handler error.\n `backp-fn` - (fn [{:keys [handler-id ]}]) to call on handler back-pressure.\n\nFlow sequence:\n\n 1. Per call (n=1)\n a. Sampling\n b. Filtering (kind, namespace, id, level, when-form)\n c. Rate limiting\n d. Middleware\n\n 2. Per handler (n>=0)\n a. Sampling\n b. Filtering (kind, namespace, id, level, when-fn)\n c. Rate limiting\n d. Middleware\n e. Hander fn\n\n Note: call filters should generally be at least as permissive as handler filters,\n otherwise calls will be suppressed before reaching handlers.", :type :var} {:name catch->error!, :file "taoensso/telemere.cljc", :line 262, :arglists ([form] [id form] [{:as opts, :keys [rethrow? catch-val elidable? location inst uid middleware sample-rate kind ns id level when rate-limit ctx parent trace? do let data msg error & kvs]} form]), :doc "Unconditionally executes given form and-\n If form succeeds: return the form's result.\n If form throws:\n Call `error!` with the thrown error and the given signal options [2],\n then return (:catch-val opts) if it exists, or rethrow the error.\n\nAPI: [form] [id-or-opts form] => form's result (value/throw) (unconditional), or (:catch-val opts)\nDefault kind: `:error`\nDefault level: `:error`\n\nExamples:\n\n (catch->error! (/ 1 0)) ; %> {:kind :error, :level :error, :error ...}\n (catch->error! ::my-id (/ 1 0)) ; %> {... :id ::my-id ...}\n (catch->error!\n {:let [x \"x\"] ; Available to `:data` and `:msg`\n :data {:x x}\n :msg [\"My msg:\" x my-error]\n :catch-val \"Return value when form throws\"\n :catch-sym my-error ; Sym of caught error, available to `:data` and `:msg`\n }\n\n (/ 1 0)) ; %> {... :data {x \"x\"}, :msg_ \"My msg: x \" ...}\n\nTips:\n\n - Test using `with-signal`: (with-signal (catch->error! ...)).\n - Supports the same options [2] as other signals [1].\n\n - Useful for recording errors in forms, futures, callbacks, etc.\n\nSee also `error!`.\n\n-------------------------------------------------------------------\n[1] See `help:signal-creators` - (`signal!`, `log!`, `event!`, ...)\n[2] See `help:signal-options` - {:keys [kind level id data ...]}\n[3] See `help:signal-content` - {:keys [kind level id data ...]}\n[4] See `help:signal-flow` - (filters, handling, etc.)", :type :macro} {:name chance, :file "taoensso/telemere.cljc", :line 86, :arglists ([prob]), :doc "Returns true with given probability ∈ ℝ[0,1].\n", :type :var} {:name check-intakes, :file "taoensso/telemere.cljc", :line 370, :arglists ([]), :doc "Experimental, subject to change.\nRuns Telemere's registered intake checks and returns\n{ {:keys [sending->telemere? telemere-receiving? ...]}}.\n\nUseful for tests/debugging.", :type :var} {:name default-ctx, :file "taoensso/telemere.cljc", :line 113, :doc "Default root (base) value of `*ctx*` var.\nDefaults to `nil`, controlled by:\n (get-env {:as :edn} :taoensso.telemere/default-ctx<.platform><.edn>)\n\nSee `get-env` for details.", :type :var} {:name error!, :file "taoensso/telemere.cljc", :line 245, :arglists ([error] [id error] [{:as opts, :keys [elidable? location inst uid middleware sample-rate kind ns id level when rate-limit ctx parent trace? do let data msg error & kvs]} error]), :doc "\"Error\" signal creator, emphasizing error + id.\n\nAPI: [error] [id-or-opts error] => given error (unconditional)\nDefault kind: `:error`\nDefault level: `:error`\n\nExamples:\n\n (throw (error! (ex-info \"MyEx\" {}))) ; %> {:kind :error, :level :error, :error ...}\n (throw (error! ::my-id (ex-info \"MyEx\" {}))) ; %> {... :id ::my-id ...}\n (throw\n (error!\n {:let [x \"x\"] ; Available to `:data` and `:msg`\n :data {:x x}\n :msg [\"My message:\" x]}\n\n (ex-info \"MyEx\" {}))) ; %> {... :data {x \"x\"}, :msg_ \"My msg: x\" ...}\n\nTips:\n\n - Test using `with-signal`: (with-signal (error! ...)).\n - Supports the same options [2] as other signals [1].\n\n - `error` arg is a platform error (`java.lang.Throwable` or `js/Error`).\n - Can conveniently be wrapped by `throw`: (throw (error! ...)).\n\n-------------------------------------------------------------------\n[1] See `help:signal-creators` - (`signal!`, `log!`, `event!`, ...)\n[2] See `help:signal-options` - {:keys [kind level id data ...]}\n[3] See `help:signal-content` - {:keys [kind level id data ...]}\n[4] See `help:signal-flow` - (filters, handling, etc.)", :type :macro} {:name error-signal?, :file "taoensso/telemere.cljc", :line 86, :arglists ([signal]), :doc "Experimental, subject to change.\nReturns true iff given signal has an `:error` value, or a `:kind` or `:level`\nthat indicates that it's an error.", :type :var} {:name event!, :file "taoensso/telemere.cljc", :line 223, :arglists ([id] [id level] [id {:as opts, :keys [elidable? location inst uid middleware sample-rate kind ns id level when rate-limit ctx parent trace? do let data msg error & kvs]}]), :doc "\"Event\" signal creator, emphasizing id + level.\n\nAPI: [id] [id level-or-opts] => true iff signal was allowed\nDefault kind: `:event`\nDefault level: `:info`\n\nWhen filtering conditions are met [4], creates a Telemere signal [3] and\ndispatches it to registered handlers for processing (e.g. writing to\nconsole/file/queue/db, etc.).\n\nExamples:\n\n (event! ::my-id) ; %> {:kind :event, :level :info, :id ::my-id ...}\n (event! ::my-id :warn) ; %> {... :level :warn ...}\n (event! ::my-id\n {:let [x \"x\"] ; Available to `:data` and `:msg`\n :data {:x x}\n :msg [\"My msg:\" x]}) ; %> {... :data {x \"x\"}, :msg_ \"My msg: x\" ...}\n\nTips:\n\n - Test using `with-signal`: (with-signal (event! ...)).\n - Supports the same options [2] as other signals [1].\n\n - `log!` and `event!` are both good default/general-purpose signal creators.\n - `log!` emphasizes messages, while `event!` emphasizes ids.\n\n - Has a different 2-arity arg order to all other signals!\n Mnemonic: the arg that's typically larger is *always* in the rightmost\n position, and for `event!` that's the `level-or-opts` arg.\n\n-------------------------------------------------------------------\n[1] See `help:signal-creators` - (`signal!`, `log!`, `event!`, ...)\n[2] See `help:signal-options` - {:keys [kind level id data ...]}\n[3] See `help:signal-content` - {:keys [kind level id data ...]}\n[4] See `help:signal-flow` - (filters, handling, etc.)", :type :macro} {:name get-env, :file "taoensso/telemere.cljc", :line 86, :arglists ([{:keys [as default return]} spec] [{:keys [as default return spec], :or {as :str, return :value}}]), :added "Encore v3.75.0 (2024-01-29)", :doc "Cross-platform util for embedding flexible environmental config during\nmacro expansion. Used by other Taoensso libraries.\n\nGiven a const kw/string id or vector of desc-priority alternative ids,\nparse and return the first of the following that exists:\n - JVM property value for id (\"prop\")\n - Environment variable value for id (\"env\")\n - Classpath resource content for id (\"res\")\n\nIds may include optional segment in `<>` tag (e.g. `<.edn>`).\nIds may include `<.?platform.?>` tag for auto replacement, useful\nfor supporting platform-specific config.\n\nSearch order: desc by combined [alt-index platform(y/n) optional(y/n)].\n\n(get-env {:as :edn} [:my-app/alt1<.platform><.edn> :my-app/alt2])\nwill parse and return the first of the following that exists:\n\n 1. Alt1 +platform +optional (content type)\n 1a. `my-app.alt1.clj.edn` JVM property value\n 1b. `MY_APP_ALT1_CLJ_EDN` environment variable value\n 1c. `my-app.alt1.clj.edn` classpath resource content\n\n 2. Alt1 +platform -optional (content type)\n 2a. `my-app.alt1.clj` JVM property value\n 2b. `MY_APP_ALT1_CLJ` environment variable value\n 2c. `my-app.alt1.clj` classpath resource content\n\n 3. Alt1 -platform +optional (content type)\n 3a. `my-app.alt1.edn` JVM property value\n 3b. `MY_APP_ALT1_EDN` environment variable value\n 3c. `my-app.alt1.edn` classpath resource content\n\n 4. Alt1 -platform -optional (content type)\n 4a. `my-app.alt1` JVM property value\n 4b. `MY_APP_ALT1` environment variable value\n 4c. `my-app.alt1` classpath resource content\n\n 5. Alt2\n 5a. `my-app.alt2` JVM property value\n 5b. `MY_APP_ALT2` environment variable value\n 5c. `my-app.alt2` classpath resource content\n\nOptions:\n `:as` - Parse found value as given type ∈ #{:str :bool :edn} (default :str).\n `:default` - Fallback to return if no value found during search (default nil).\n `:return` - Return type ∈ #{:value :map :debug} (default :value).\n TIP: Use `:debug` to inspect/verify search behaviour!\n\nResult must be something that can be safely embedded in code during\nmacro-expansion. Symbols in edn will be evaluated during expansion.", :type :macro} {:name get-filters, :file "taoensso/telemere.cljc", :line 49, :arglists ([]), :doc "Returns current ?{:keys [compile-time runtime]} filter config.\n", :type :var} {:name get-handlers, :file "taoensso/telemere.cljc", :line 49, :arglists ([]), :doc "Returns ?{ {:keys [dispatch-opts handler-fn]}} for all\nregistered signal handlers.", :type :var} {:name get-min-level, :file "taoensso/telemere.cljc", :line 49, :arglists ([] [kind] [kind ns]), :doc "Returns current ?{:keys [compile-time runtime]} minimum levels.\n", :type :var} {:name handler:console, :file "taoensso/telemere.cljc", :line 401, :arglists ([] [{:keys [format-signal-fn stream], :or {format-signal-fn (utils/format-signal->str-fn)}}]), :doc "Experimental, subject to change.\n\nReturns a (fn handler [signal]) that:\n - Takes a Telemere signal.\n - Writes a formatted signal string to stream.\n\nOptions:\n `:format-signal-fn` - (fn [signal]) => output, see `help:signal-formatters`\n\n `:stream` - `java.io.writer`\n Defaults to `*err*` if `utils/error-signal?` is true, and `*out*` otherwise.", :type :var} {:name handler:file, :file "taoensso/telemere.cljc", :line 401, :arglists ([] [{:keys [format-signal-fn path interval max-file-size max-num-parts max-num-intervals gzip-archives?], :or {format-signal-fn (utils/format-signal->str-fn), path "logs/telemere.log", interval :monthly, max-file-size (* 1024 1024 4), max-num-parts 8, max-num-intervals 6, gzip-archives? true}}]), :doc "Experimental, subject to change.\n\n Returns a (fn handler [signal]) that:\n - Takes a Telemere signal.\n - Writes a formatted signal string to file.\n\nSignals will be appended to file specified by `path`.\nDepending on options, archives may be maintained:\n - `logs/app.log.n.gz` (for nil `:interval`, non-nil `:max-file-size`)\n - `logs/app.log-YYYY-MM-DDd.n.gz` (for non-nil `:interval`) ; d=daily/w=weekly/m=monthly\n\nExample files with default options:\n `/logs/telemere.log` ; Current file\n `/logs/telemere.log-2020-01-01m.1.gz` ; Archive for Jan 2020, part 1 (newest entries)\n ...\n `/logs/telemere.log-2020-01-01m.8.gz` ; Archive for Jan 2020, part 8 (oldest entries)\n\nOptions:\n `:format-signal-fn`- (fn [signal]) => output, see `help:signal-formatters`.\n `:path` - Path string of the target output file (default `logs/telemere.log`).\n `:interval` - ∈ #{nil :daily :weekly :monthly} (default `:monthly`).\n When non-nil, causes interval-based archives to be maintained.\n\n `:max-file-size` ∈ #{nil } (default 4MB)\n When `path` file size > ~this many bytes, rotates old content to numbered archives.\n\n `:max-num-parts` ∈ #{nil } (default 8)\n Maximum number of numbered archives to retain for any particular interval.\n\n `:max-num-intervals` ∈ #{nil } (default 6)\n Maximum number of intervals (days/weeks/months) to retain.", :type :var} {:name handler:open-telemetry-logger, :file "taoensso/telemere.cljc", :line 409, :arglists ([] [{:keys [logger-provider attrs-key], :or {logger-provider (get-default-logger-provider), attrs-key :open-telemetry-attrs}}]), :doc "Experimental, subject to change!! Feedback very welcome!\n\nReturns a (fn handler [signal]) that:\n - Takes a Telemere signal.\n - Emits signal content to the `io.opentelemetry.api.logs.Logger`\n returned by given `io.opentelemetry.api.logs.LoggerProvider`.", :type :var} {:name help:filters, :file "taoensso/telemere.cljc", :line 49, :doc "Your filter config determines which signal calls will be allowed.\n\nFiltering can occur at compile-time (=> elision), or runtime.\nBoth compile-time and runtime config can be specified with:\n\n System values (JVM properties, environment variables, or\n classpath resources) [1].\n\nRuntime config can also be specified with:\n\n `set-kind-filter!`, `with-kind-filter` - for filtering calls by signal kind (when relevant)\n `set-ns-filter!`, `with-ns-filter` - for filtering calls by namespace\n `set-id-filter!`, `with-id-filter` - for filtering calls by signal id (when relevant)\n `set-minimum-level!`, `with-minimum-level!` - for filtering calls by signal level\n\n See the relevant docstrings for details.\n\nFiltering can also be applied per handler, see `add-handler!` for details.\n\nSee also:\n\n `get-filters` - to see current filter config\n `get-min-level` - to see current minimum level\n `without-filters` - to disable all runtime filtering\n\nIf anything is unclear, please ping me (@ptaoussanis) so that I can\nimprove these docs!\n\n[1] These include:\n\n Compile-time:\n\n ns-filter: (get-env {:as :edn} :taoensso.telemere/ct-ns-filter<.platform><.edn>)\n id-filter: (get-env {:as :edn} :taoensso.telemere/ct-id-filter<.platform><.edn>)\n min-level: (get-env {:as :edn} :taoensso.telemere/ct-min-level<.platform><.edn>)\n\n Runtime:\n\n ns-filter: (get-env {:as :edn} :taoensso.telemere/rt-ns-filter<.platform><.edn>)\n id-filter: (get-env {:as :edn} :taoensso.telemere/rt-id-filter<.platform><.edn>)\n min-level: (get-env {:as :edn, :default :info} :taoensso.telemere/rt-min-level<.platform><.edn>)\n\n See `get-env` for details.", :type :var} {:name help:handlers, :file "taoensso/telemere.cljc", :line 49, :doc "Manage handlers with:\n\n `get-handlers` - Returns info on registered handlers\n `shut-down-handlers!` - Shuts down registered handlers\n\n `add-handler!` - Registers given handler\n `remove-handler!` - Unregisters given handler\n\nSee the relevant docstrings for details.\nClj only: `shut-down-handlers!` is called automatically on JVM shutdown.\n\nIf anything is unclear, please ping me (@ptaoussanis) so that I can\nimprove these docs!", :type :var} {:name help:signal-content, :file "taoensso/telemere.cljc", :line 106, :doc "Signals are maps with {:keys [inst id ns level data msg_ ...]},\nthough they can be modified by signal and/or handler middleware.\n\nDefault signal keys:\n\n`:schema` ------ Int version of signal schema (current: 1)\n`:inst` -------- Platform instant [1] when signal was created\n`:level` ------- Signal level ∈ #{ :trace :debug :info :warn :error :fatal :report ...}\n`:kind` -------- Signal ?kind ∈ #{nil :event :error :log :trace :spy ...}\n`:id` ---------- ?id of signal (common to all signals created at callsite, contrast with `:uid`)\n`:uid` --------- ?id of signal instance (unique to each signal created at callsite, contrast with `:id`)\n\n`:msg` --------- Arb user-level message ?str given to signal creator\n`:data` -------- Arb user-level data ?val (usu. a map) given to signal creator\n`:error` ------- Arb user-level platform ?error [2] given to signal creator\n\n`:run-form` ---- Unevaluated ?form given to signal creator as `:run`\n`:run-val` ----- Successful return ?val of `:run` ?form\n`:run-nsecs` --- ?int nanosecs runtime of `:run` ?form\n`:end-inst` ---- Platform ?instant [1] when `:run` ?form completed\n\n`:ctx` --------- ?val of `*ctx*` (arb user-level state) when signal was created\n`:parent` ------ ?{:keys [id uid]} of parent signal, present in nested signals when tracing\n`:location` ---- ?{:keys [ns file line column]} signal creator callsite\n`:ns` ---------- ?str namespace of signal creator callsite, same as (:ns location)\n`:line` -------- ?int line of signal creator callsite, same as (:line location)\n`:column` ------ ?int column of signal creator callsite, same as (:column location)\n`:file` -------- ?str filename of signal creator callsite, same as (:file location)\n`:sample-rate` - ?rate ∈ℝ[0,1] for combined signal AND handler sampling (0.75 => allow 75% of signals, nil => allow all)\n\n ---------- Arb other user-level ?kvs given to signal creator\n\nIf anything is unclear, please ping me (@ptaoussanis) so that I can improve these docs!\n\n[1] `java.time.Instant` or `js/Date`\n[2] `java.lang.Throwable` or `js/Error`", :type :var} {:name help:signal-creators, :file "taoensso/telemere.cljc", :line 103, :doc "Call a Telemere signal creator to conditionally create a signal at that callsite.\n\nWhen filtering conditions are met [4], the call creates a Telemere signal [3]\nand dispatches it to registered handlers for processing (e.g. writing to\nconsole/file/queue/db, etc.).\n\nTelemere doesn't make a hard distinction between different kinds of signals\n(log, event, error, etc.) - they're all just plain Clojure/Script maps with\nvarious keys:\n\n - All signal creators offer the same options [2], and\n - All signal kinds can contain the same content [3]\n\nCreators vary only in in their default options and call APIs (expected args\nand return values), making them more/less convenient for certain use cases:\n\n `log!` ---------- [message + opts/level] => true iff signal was created (allowed)\n `event!` -------- [id + opts/level] => true iff signal was created (allowed)\n `error!` -------- [error + opts/id ] => given error (unconditional)\n `trace!` -------- [form + opts/id ] => form result (value/throw) (unconditional)\n `spy!` ---------- [form + opts/level] => form result (value/throw) (unconditional)\n `catch->error!` - [error + opts/id ] => form value, or given fallback\n `signal!` ------- [ opts ] => depends on options\n\n- `log!` and `event!` are both good default/general-purpose signal creators.\n- `log!` emphasizes messages, while `event!` emphasizes ids.\n- `signal!` is the generic creator, and is used by all the others.\n\n-------------------------------------------------------------------\n[2] See `help:signal-options` - {:keys [kind level id data ...]}\n[3] See `help:signal-content` - {:keys [kind level id data ...]}\n[4] See `help:signal-flow` - (filters, handling, etc.)", :type :var} {:name help:signal-filters, :file "taoensso/telemere.cljc", :line 107, :doc "Your filter config determines which signal calls will be allowed.\n\nFiltering can occur at compile-time (=> elision), or runtime.\nBoth compile-time and runtime config can be specified with:\n\n System values (JVM properties, environment variables, or\n classpath resources) [1].\n\nRuntime config can also be specified with:\n\n `set-kind-filter!`, `with-kind-filter` - for filtering calls by signal kind (when relevant)\n `set-ns-filter!`, `with-ns-filter` - for filtering calls by namespace\n `set-id-filter!`, `with-id-filter` - for filtering calls by signal id (when relevant)\n `set-minimum-level!`, `with-minimum-level!` - for filtering calls by signal level\n\n See the relevant docstrings for details.\n\nFiltering can also be applied per handler, see `add-handler!` for details.\n\nSee also:\n\n `get-filters` - to see current filter config\n `get-min-level` - to see current minimum level\n `without-filters` - to disable all runtime filtering\n\nIf anything is unclear, please ping me (@ptaoussanis) so that I can\nimprove these docs!\n\n[1] These include:\n\n Compile-time:\n\n ns-filter: (get-env {:as :edn} :taoensso.telemere/ct-ns-filter<.platform><.edn>)\n id-filter: (get-env {:as :edn} :taoensso.telemere/ct-id-filter<.platform><.edn>)\n min-level: (get-env {:as :edn} :taoensso.telemere/ct-min-level<.platform><.edn>)\n\n Runtime:\n\n ns-filter: (get-env {:as :edn} :taoensso.telemere/rt-ns-filter<.platform><.edn>)\n id-filter: (get-env {:as :edn} :taoensso.telemere/rt-id-filter<.platform><.edn>)\n min-level: (get-env {:as :edn, :default :info} :taoensso.telemere/rt-min-level<.platform><.edn>)\n\n See `get-env` for details.", :type :var} {:name help:signal-flow, :file "taoensso/telemere.cljc", :line 105, :doc "A signal will be provided to a handler iff ALL of the following are true:\n 1. Signal (creation) is allowed by compile-time filters\n 2. Signal (creation) is allowed by runtime filters\n 3. Signal (handling) is allowed by handler filters\n\n 4. Signal middleware does not suppress the signal (return nil)\n 5. Handler middleware does not suppress the signal (return nil)\n\nFor 1-3, filtering may depend on (in order):\n Sample rate → namespace → kind → id → level → when form/fn → rate limit\n\nNote that sample rates are multiplicative:\n If a signal is created with 20% sampling and a handler handles 50%\n of given signals, then 10% of possible signals will be handled.\n\n This multiplicative rate is helpfully reflected in each signal's final\n `:sample-rate` value.\n\nFor a visual flowchart, see: Ref. \n\nFor more info:\n - On signal filters, see: `help:signal-filters` docstring\n - On handler filters, see: `help:signal-handlers` docstring\n\nIf anything is unclear, please ping me (@ptaoussanis) so that I can\nimprove these docs!", :type :var} {:name help:signal-formatters, :file "taoensso/telemere.cljc", :line 109, :doc "Common signal formatters include:\n (utils/format-signal-str->fn) {}) ; For human-readable string output (default)\n (utils/format-signal->edn-fn) {}) ; For edn output\n (utils/format-signal->json-fn {}) ; For JSON output\n\nSee relevant docstrings for details.", :type :var} {:name help:signal-handlers, :file "taoensso/telemere.cljc", :line 108, :doc "Manage handlers with:\n\n `get-handlers` - Returns info on registered handlers\n `shut-down-handlers!` - Shuts down registered handlers\n\n `add-handler!` - Registers given handler\n `remove-handler!` - Unregisters given handler\n\nSee the relevant docstrings for details.\nClj only: `shut-down-handlers!` is called automatically on JVM shutdown.\n\nIf anything is unclear, please ping me (@ptaoussanis) so that I can\nimprove these docs!", :type :var} {:name help:signal-options, :file "taoensso/telemere.cljc", :line 104, :doc "Signal options (shared by all signal creators):\n\n`:inst` -------- Platform instant [1] when signal was created, ∈ #{nil :auto }\n`:level` ------- Signal level ∈ #{ :trace :debug :info :warn :error :fatal :report ...}\n`:kind` -------- Signal ?kind ∈ #{nil :event :error :log :trace :spy ...}\n`:id` ---------- ?id of signal (common to all signals created at callsite, contrast with `:uid`)\n`:uid` --------- ?id of signal instance (unique to each signal created at callsite, contrast with `:id`)\n\n`:msg` --------- Arb user-level ?message to incl. in signal: str or vec of strs to join (with `\\space`)\n`:data` -------- Arb user-level ?data to incl. in signal: usu. a map\n`:error` ------- Arb user-level ?error to incl. in signal: platform error [2]\n\n`:run` --------- ?form to execute UNCONDITIONALLY; will incl. `:run-value` in signal\n`:do` ---------- ?form to execute conditionally (iff signal allowed), before establishing `:let` ?binding\n`:let` --------- ?bindings to establish conditionally (iff signal allowed), BEFORE evaluating `:data` and `:msg` (useful!)\n\n`:ctx` --------- Custom ?val to override auto (dynamic `*ctx*`) in signal\n`:parent` ------ Custom ?{:keys [id uid]} to override auto (dynamic) parent signal info in signal\n`:location` ---- Custom ?{:keys [ns line column file]} to override auto signal creator callsite location\n\n`:elidable?` --- Should signal be subject to compile-time elision? (Default: true).\n`:sample-rate` - ?rate ∈ℝ[0,1] for signal sampling (0.75 => allow 75% of signals, nil => allow all)\n`:when` -------- Arb ?form; when present, form must return truthy to allow signal\n`:rate-limit` -- ?spec as given to `taoensso.telemere/rate-limiter`, see its docstring for details\n`:middleware` -- ?[(fn [signal])=>modified-signal ...] signal middleware\n`:trace?` ------ Should tracing be enabled for `:run` form?\n\n ---------- Arb other user-level ?kvs to incl. in signal\n\nIf anything is unclear, please ping me (@ptaoussanis) so that I can improve these docs!\n\n[1] `java.time.Instant` or `js/Date`\n[2] `java.lang.Throwable` or `js/Error`", :type :var} {:name level-aliases, :file "taoensso/telemere.cljc", :line 49, :doc "Map of { } aliases.\n", :type :var} {:name log!, :file "taoensso/telemere.cljc", :line 234, :arglists ([msg] [level msg] [{:as opts, :keys [elidable? location inst uid middleware sample-rate kind ns id level when rate-limit ctx parent trace? do let data msg error & kvs]} msg]), :doc "\"Log\" signal creator, emphasizing message + level.\n\nAPI: [msg] [level-or-opts msg] => true iff signal was allowed.\nDefault kind: `:log`\nDefault level: `:info`\n\nWhen filtering conditions are met [4], creates a Telemere signal [3] and\ndispatches it to registered handlers for processing (e.g. writing to\nconsole/file/queue/db, etc.).\n\nExamples:\n\n (log! \"My msg\") ; %> {:kind :log, :level :info, :id ::my-id ...}\n (log! :warn \"My msg\") ; %> {... :level :warn ...}\n (log!\n {:let [x \"x\"] ; Available to `:data` and `:msg`\n :data {:x x}}\n\n [\"My msg:\" x]) ; %> {... :data {x \"x\"}, :msg_ \"My msg: x\" ...}\n\nTips:\n\n - Test using `with-signal`: (with-signal (log! ...)).\n - Supports the same options [2] as other signals [1].\n\n - `log!` and `event!` are both good default/general-purpose signal creators.\n - `log!` emphasizes messages, while `event!` emphasizes ids.\n\n - `msg` arg may be a string, or vector of strings to join with `\\space`.\n - See also `msg-splice`, `msg-skip` utils.\n\n-------------------------------------------------------------------\n[1] See `help:signal-creators` - (`signal!`, `log!`, `event!`, ...)\n[2] See `help:signal-options` - {:keys [kind level id data ...]}\n[3] See `help:signal-content` - {:keys [kind level id data ...]}\n[4] See `help:signal-flow` - (filters, handling, etc.)", :type :macro} {:name msg-skip, :file "taoensso/telemere.cljc", :line 86, :doc "For use within signal message vectors.\nSpecial value that will be ignored (no-op) when creating message.\nUseful for conditionally skipping parts of message content, etc.:\n\n (signal! {:msg [\"Hello\" (if msg-skip) \"world\"] <...>}) or\n (log! [\"Hello\" (if msg-skip) \"world\"]), etc.\n\n %> {:msg_ \"Hello world\" <...>}", :type :var} {:name msg-splice, :file "taoensso/telemere.cljc", :line 86, :arglists ([args]), :doc "For use within signal message vectors.\nWraps given arguments so that they're spliced when creating message.\nUseful for conditionally splicing in extra message content, etc.:\n\n (signal! {:msg [(when (msg-splice [\"Username:\" \"Steve\"])) <...>]}) or\n (log! [(when (msg-splice [\"Username:\" \"Steve\"]))])\n\n %> {:msg_ \"Username: Steve\"}", :type :var} {:name newline, :file "taoensso/telemere.cljc", :line 86, :added "Encore v3.68.0 (2023-09-25)", :doc "Single system newline\n", :type :var} {:name rate-limiter, :file "taoensso/telemere.cljc", :line 86, :arglists ([spec] [opts spec]), :doc "Takes a map spec of form { [ ]},\nand returns a basic stateful (fn rate-limiter [req-id] [command req-id]).\n\nCall fn with a single request id (e.g. username) by which to count/limit.\nWill return:\n - nil when all limits pass for that id, or\n - [ { }]\n when any limits fail for that id.\n\nOr call fn with an additional command argument:\n `:rl/peek` - Check limits w/o incrementing count.\n `:rl/reset` - Reset all limits for given req-id.\n\nExample:\n\n (defonce my-rate-limiter\n (rate-limiter\n {\"1 per sec\" [1 1000]\n \"10 per min\" [10 60000]}))\n\n (defn send-message! [username msg-content]\n (if-let [fail (my-rate-limiter username)]\n (throw (ex-info \"Sorry, rate limited!\" {:fail fail}))\n ))", :type :var} {:name remove-handler!, :file "taoensso/telemere.cljc", :line 49, :arglists ([handler-id]), :doc "Deregisters signal handler with given id, and returns\n?{ {:keys [dispatch-opts handler-fn]}} for all signal handlers\nstill registered.", :type :var} {:name set-ctx!, :file "taoensso/telemere.cljc", :line 138, :arglists ([root-val]), :doc "Set `*ctx*` var's root (base) value. See `*ctx*` for details.\n", :type :macro} {:name set-id-filter!, :file "taoensso/telemere.cljc", :line 49, :arglists ([id-filter]), :doc "Sets signal call id filter based on given `id-filter` spec.\n`id-filter` may be:\n\n - A regex pattern of id/s to allow.\n - A str/kw/sym, in which \"*\"s act as wildcards.\n - A vector or set of regex patterns or strs/kws/syms.\n - {:allow :deny } with specs as above.\n If present, `:allow` spec MUST match, AND\n If present, `:deny` spec MUST NOT match.", :type :var} {:name set-kind-filter!, :file "taoensso/telemere.cljc", :line 49, :arglists ([kind-filter]), :doc "Sets signal call kind filter based on given `kind-filter` spec.\n`kind-filter` may be:\n\n - A regex pattern of kind/s to allow.\n - A str/kw/sym, in which \"*\"s act as wildcards.\n - A vector or set of regex patterns or strs/kws/syms.\n - {:allow :deny } with specs as above.\n If present, `:allow` spec MUST match, AND\n If present, `:deny` spec MUST NOT match.", :type :var} {:name set-middleware!, :file "taoensso/telemere.cljc", :line 178, :arglists ([root-val]), :doc "Set `*middleware*` var's root (base) value. See `*middleware*` for details.\n", :type :macro} {:name set-min-level!, :file "taoensso/telemere.cljc", :line 49, :arglists ([min-level] [kind min-level] [kind ns-filter min-level]), :doc "Sets minimum signal call level based on given `min-level` spec.\n`min-level` may be:\n\n - An integer.\n - A level keyword (see `level-aliases` var for details).\n\nIf `ns-filter` is provided, then the given minimum level\nwill apply only for namespaces that match `ns-filter`.\nSee `set-ns-filter!` for details.\n\nIf non-nil `kind` is provided, then the given minimum level\nwill apply only for that signal kind.", :type :var} {:name set-ns-filter!, :file "taoensso/telemere.cljc", :line 49, :arglists ([ns-filter]), :doc "Sets signal call namespace filter based on given `ns-filter` spec.\n`ns-filter` may be:\n\n - A regex pattern of namespace/s to allow.\n - A str/kw/sym, in which \"*\"s act as wildcards.\n - A vector or set of regex patterns or strs/kws/syms.\n - {:allow :deny } with specs as above.\n If present, `:allow` spec MUST match, AND\n If present, `:deny` spec MUST NOT match.", :type :var} {:name set-var-root!, :file "taoensso/telemere.cljc", :line 86, :arglists ([var-sym root-val]), :added "Encore v3.75.0 (2024-01-29)", :doc "Sets root binding (value) of the var identified by given symbol, and returns\nthe new value. Cross-platform. See also `update-var-root!`.", :type :macro} {:name shut-down-handlers!, :file "taoensso/telemere.cljc", :line 49, :arglists ([] [timeout-msecs__6166__auto__]), :doc "Shuts down all registered signal handlers and returns\n?{ {:keys [okay error]}}.\n\nFuture calls to handlers will no-op.\nClj only: `shut-down-handlers!` is called automatically on JVM shutdown.", :type :var} {:name signal!, :file "taoensso/telemere.cljc", :line 86, :arglists ([{:as opts, :keys [elidable? location inst uid middleware sample-rate kind ns id level when rate-limit ctx parent trace? do let data msg error run & kvs]}]), :doc "Low-level generic signal creator.\n\nAPI: [opts] => depends on options [2]\nDefault kind: none (optional)\nDefault level: none (must be provided)\n\nWhen filtering conditions are met [4], creates a Telemere signal [3] and\ndispatches it to registered handlers for processing (e.g. writing to\nconsole/file/queue/db, etc.).\n\nIf `:run` option is provided: returns value of given run form, or throws.\n Otherwise: returns true iff signal was created (allowed).\n\nGeneric signals are fairly low-level and useful mostly for library authors or\nadvanced users writing their own wrapper macros. Regular users will typically\nprefer one of the higher-level signal creators optimized for ease-of-use in\ncommon cases [1].\n\nTips:\n\n - Test using `with-signal`: (with-signal (signal! ...)).\n - Supports the same options [2] as other signals [1].\n\n-------------------------------------------------------------------\n[1] See `help:signal-creators` - (`signal!`, `log!`, `event!`, ...)\n[2] See `help:signal-options` - {:keys [kind level id data ...]}\n[3] See `help:signal-content` - {:keys [kind level id data ...]}\n[4] See `help:signal-flow` - (filters, handling, etc.)", :type :macro} {:name spy!, :file "taoensso/telemere.cljc", :line 313, :arglists ([form] [id form] [{:as opts, :keys [elidable? location inst uid middleware sample-rate kind ns id level when rate-limit ctx parent trace? do let data msg error run & kvs]} form]), :doc "\"Spy\" signal creator, emphasizing form + level.\n\nAPI: [form] [level-or-opts form] => form's result (value/throw) (unconditional)\nDefault kind: `:spy`\nDefault level: `:info`\n\nWhen filtering conditions are met [4], creates a Telemere signal [3] and\ndispatches it to registered handlers for processing (e.g. writing to\nconsole/file/queue/db, etc.).\n\nExamples:\n\n (spy! (+ 1 2)) ; %> {:kind :trace, :level :info, :run-form '(+ 1 2),\n ; :run-val 3, :run-nsecs , :parent {:keys [id uid]}\n ; :msg \"(+ 1 2) => 3\" ...}\n (spy! ::my-id (+ 1 2)) ; %> {... :id ::my-id ...}\n (spy!\n {:let [x \"x\"] ; Available to `:data` and `:msg`\n :data {:x x}}\n\n (+ 1 2)) ; %> {... :data {x \"x\"}, :msg_ \"My msg: x\" ...}\n\nTips:\n\n - Test using `with-signal`: (with-signal (spy! ...)).\n - Supports the same options [2] as other signals [1].\n\n - Identical to `trace!`, but emphasizes form + level rather than form + id.\n\n - Useful for debugging/monitoring forms, and tracing (nested) execution flow.\n - Execution of `form` arg may create additional (nested) signals.\n Each signal's `:parent` key will indicate its immediate parent.\n\n - Can be useful to wrap with `catch->error!`:\n (catch->error! ::error-id (spy! ...)).\n\n-------------------------------------------------------------------\n[1] See `help:signal-creators` - (`signal!`, `log!`, `event!`, ...)\n[2] See `help:signal-options` - {:keys [kind level id data ...]}\n[3] See `help:signal-content` - {:keys [kind level id data ...]}\n[4] See `help:signal-flow` - (filters, handling, etc.)", :type :macro} {:name streams->reset!, :file "taoensso/telemere.cljc", :line 370, :arglists ([]), :doc "Experimental, subject to change without notice!\nResets `System/out` and `System/err` to their original value (prior to any\n`streams->telemere!` call).", :type :var} {:name streams->telemere!, :file "taoensso/telemere.cljc", :line 370, :arglists ([] [{:keys [out err], :or {out default-out-opts, err default-err-opts}}]), :doc "Experimental, subject to change without notice!\n\nWhen given `out`, sets JVM's `System/out` to flush to Telemere signals with those opts.\nWhen given `err`, sets JVM's `System/err` to flush to Telemere signals with those opts.\n\nNote that setting `System/out` won't necessarily affect Clojure's `*out*`,\nand setting `System/err` won't necessarily affect Clojure's `*err*`.\n\nSee also:\n `with-out->telemere`,\n `with-err->telemere`,\n `with-streams->telemere`.", :type :var} {:name tools-logging->telemere!, :file "taoensso/telemere.cljc", :line 381, :arglists ([]), :doc "Configures `clojure.tools.logging` to use Telemere as its logging implementation.\n\nCalled automatically if the following is true:\n (get-env {:as :bool} :clojure.tools.logging->telemere?)\n\nSee `get-env` for details.", :type :var} {:name trace!, :file "taoensso/telemere.cljc", :line 286, :arglists ([form] [id form] [{:as opts, :keys [elidable? location inst uid middleware sample-rate kind ns id level when rate-limit ctx parent trace? do let data msg error run & kvs]} form]), :doc "\"Trace\" signal creator, emphasizing form + id.\n\nAPI: [form] [id-or-opts form] => form's result (value/throw) (unconditional)\nDefault kind: `:trace`\nDefault level: `:info` (intentionally NOT `:trace`!)\n\nWhen filtering conditions are met [4], creates a Telemere signal [3] and\ndispatches it to registered handlers for processing (e.g. writing to\nconsole/file/queue/db, etc.).\n\nExamples:\n\n (trace! (+ 1 2)) ; %> {:kind :trace, :level :info, :run-form '(+ 1 2),\n ; :run-val 3, :run-nsecs , :parent {:keys [id uid]} ...\n ; :msg \"(+ 1 2) => 3\" ...}\n (trace! ::my-id (+ 1 2)) ; %> {... :id ::my-id ...}\n (trace!\n {:let [x \"x\"] ; Available to `:data` and `:msg`\n :data {:x x}}\n\n (+ 1 2)) ; %> {... :data {x \"x\"}, :msg_ \"My msg: x\" ...}\n\nTips:\n\n - Test using `with-signal`: (with-signal (trace! ...)).\n - Supports the same options [2] as other signals [1].\n\n - Identical to `spy!`, but emphasizes form + id rather than form + level.\n\n - Useful for debugging/monitoring forms, and tracing (nested) execution flow.\n - Execution of `form` arg may create additional (nested) signals.\n Each signal's `:parent` key will indicate its immediate parent.\n\n - Can be useful to wrap with `catch->error!`:\n (catch->error! ::error-id (trace! ...)).\n\n - Default level is `:info`, not `:trace`! The name \"trace\" in \"trace signal\"\n refers to the general action of tracing program flow rather than to the\n common logging level of the same name.\n\n-------------------------------------------------------------------\n[1] See `help:signal-creators` - (`signal!`, `log!`, `event!`, ...)\n[2] See `help:signal-options` - {:keys [kind level id data ...]}\n[3] See `help:signal-content` - {:keys [kind level id data ...]}\n[4] See `help:signal-flow` - (filters, handling, etc.)", :type :macro} {:name uncaught->error!, :file "taoensso/telemere.cljc", :line 334, :arglists ([] [id] [{:as opts, :keys [elidable? location inst uid middleware sample-rate kind ns id level when rate-limit ctx parent trace? do let data msg error & kvs]}]), :doc "Uses `uncaught->handler!` so that `error!` will be called for\nuncaught JVM errors.\n\nSee `uncaught->handler!` and `error!` for details.", :type :macro} {:name uncaught->handler!, :file "taoensso/telemere.cljc", :line 355, :arglists ([handler]), :doc "Sets JVM's global `DefaultUncaughtExceptionHandler` to given\n (fn handler [`` ``]).\n\nSee also `uncaught->error!`.", :type :var} {:name update-var-root!, :file "taoensso/telemere.cljc", :line 86, :arglists ([var-sym update-fn]), :added "Encore v3.68.0 (2023-09-25)", :doc "Updates root binding (value) of the var identified by given symbol, and returns\nthe new value:\n (update-var-root! my-var (fn [old-root-val] )) => \n\nSimilar to `alter-var-root` but cross-platform and takes a symbol rather than a var.\nSee also `set-var-root!`.", :type :macro} {:name with-ctx, :file "taoensso/telemere.cljc", :line 143, :arglists ([init-val form]), :doc "Evaluates given form with given `*ctx*` value. See `*ctx*` for details.\n", :type :macro} {:name with-ctx+, :file "taoensso/telemere.cljc", :line 150, :arglists ([update-map-or-fn form]), :doc "Evaluates given form with updated `*ctx*` value.\n\n`update-map-or-fn` may be:\n - A map to merge with current `*ctx*` value, or\n - A unary fn to apply to current `*ctx*` value\n\nSee `*ctx*` for details.", :type :macro} {:name with-err->telemere, :file "taoensso/telemere.cljc", :line 370, :arglists ([form] [opts form]), :doc "Executes form with `*err*` bound to flush to Telemere signals with given opts.\n", :type :macro} {:name with-handler, :file "taoensso/telemere.cljc", :line 49, :arglists ([handler-id handler-fn dispatch-opts form]), :doc "Executes form with ONLY the given handler-fn registered.\nUseful for tests/debugging. See also `with-handler+`.", :type :macro} {:name with-handler+, :file "taoensso/telemere.cljc", :line 49, :arglists ([handler-id handler-fn dispatch-opts form]), :doc "Executes form with the given handler-fn registered.\nUseful for tests/debugging. See also `with-handler`.", :type :macro} {:name with-id-filter, :file "taoensso/telemere.cljc", :line 49, :arglists ([id-filter form]), :doc "Executes form with given signal call id filter in effect.\nSee `set-id-filter!` for details.", :type :macro} {:name with-kind-filter, :file "taoensso/telemere.cljc", :line 49, :arglists ([kind-filter form]), :doc "Executes form with given signal call kind filter in effect.\nSee `set-kind-filter!` for details.", :type :macro} {:name with-middleware, :file "taoensso/telemere.cljc", :line 183, :arglists ([init-val form]), :doc "Evaluates given form with given `*middleware*` value.\nSee `*middleware*` for details.", :type :macro} {:name with-min-level, :file "taoensso/telemere.cljc", :line 49, :arglists ([min-level form] [kind min-level form] [kind ns-filter min-level form]), :doc "Executes form with given minimum signal call level in effect.\nSee `set-min-level!` for details.", :type :macro} {:name with-ns-filter, :file "taoensso/telemere.cljc", :line 49, :arglists ([ns-filter form]), :doc "Executes form with given signal call namespace filter in effect.\nSee `set-ns-filter!` for details.", :type :macro} {:name with-out->telemere, :file "taoensso/telemere.cljc", :line 370, :arglists ([form] [opts form]), :doc "Executes form with `*out*` bound to flush to Telemere signals with given opts.\n", :type :macro} {:name with-signal, :file "taoensso/telemere.cljc", :line 86, :arglists ([form] [trap-signals? form] [raw-msg? trap-signals? form]), :doc "Experimental.\nExecutes given form, trapping errors. Returns the LAST signal created by form.\nUseful for tests/debugging.\n\nOptions:\n `trap-signals?` (default: false)\n Should ALL signals created by form be trapped to prevent normal dispatch\n to registered handlers?\n\n `raw-msg?` (default: false)\n Should delayed `:msg_` in returned signal be retained as-is?\n Delay is otherwise replaced by realized string.\n\nSee also `with-signals`.", :type :macro} {:name with-signals, :file "taoensso/telemere.cljc", :line 86, :arglists ([form] [trap-signals? form] [raw-msgs? trap-signals? form]), :doc "Experimental.\nLike `with-signal` but returns [[ ] [ ...]].\nUseful for tests/debugging.", :type :macro} {:name with-streams->telemere, :file "taoensso/telemere.cljc", :line 370, :arglists ([form] [{:keys [out err], :or {out default-out-opts, err default-err-opts}} form]), :doc "Executes form with `*out*` and/or `*err*` bound to flush to Telemere signals\nwith given opts.", :type :macro} {:name without-filters, :file "taoensso/telemere.cljc", :line 49, :arglists ([form]), :doc "Executes form without any runtime filters.\n", :type :macro}), :doc "Structured telemetry for Clojure/Script applications.\n\nSee the GitHub page (esp. Wiki) for info on motivation and design:\n "} {:name taoensso.telemere.timbre, :publics ({:name debug, :file "taoensso/telemere/timbre.cljc", :line 84, :arglists ([& args]), :doc "Prefer `telemere/log!`, etc.\n", :type :macro} {:name debugf, :file "taoensso/telemere/timbre.cljc", :line 93, :arglists ([& args]), :doc "Prefer `telemere/log!`, etc.\n", :type :macro} {:name error, :file "taoensso/telemere/timbre.cljc", :line 87, :arglists ([& args]), :doc "Prefer `telemere/log!`, etc.\n", :type :macro} {:name errorf, :file "taoensso/telemere/timbre.cljc", :line 96, :arglists ([& args]), :doc "Prefer `telemere/log!`, etc.\n", :type :macro} {:name fatal, :file "taoensso/telemere/timbre.cljc", :line 88, :arglists ([& args]), :doc "Prefer `telemere/log!`, etc.\n", :type :macro} {:name fatalf, :file "taoensso/telemere/timbre.cljc", :line 97, :arglists ([& args]), :doc "Prefer `telemere/log!`, etc.\n", :type :macro} {:name info, :file "taoensso/telemere/timbre.cljc", :line 85, :arglists ([& args]), :doc "Prefer `telemere/log!`, etc.\n", :type :macro} {:name infof, :file "taoensso/telemere/timbre.cljc", :line 94, :arglists ([& args]), :doc "Prefer `telemere/log!`, etc.\n", :type :macro} {:name log, :file "taoensso/telemere/timbre.cljc", :line 82, :arglists ([level & args]), :doc "Prefer `telemere/log!`, etc.\n", :type :macro} {:name log-and-rethrow-errors, :file "taoensso/telemere/timbre.cljc", :line 126, :arglists ([& body]), :doc "Prefer `telemere/catch->error!`.\n", :type :macro} {:name log-errors, :file "taoensso/telemere/timbre.cljc", :line 125, :arglists ([& body]), :doc "Prefer `telemere/catch->error!`.\n", :type :macro} {:name logf, :file "taoensso/telemere/timbre.cljc", :line 91, :arglists ([level & args]), :doc "Prefer `telemere/log!`, etc.\n", :type :macro} {:name logged-future, :file "taoensso/telemere/timbre.cljc", :line 127, :arglists ([& body]), :doc "Prefer `telemere/catch->error!`.\n", :type :macro} {:name refer-timbre, :file "taoensso/telemere/timbre.cljc", :line 130, :arglists ([]), :doc "(require\n'[taoensso.telemere.timbre :as timbre :refer\n [log trace debug info warn error fatal report\n logf tracef debugf infof warnf errorf fatalf reportf\n spy]])", :type :macro} {:name report, :file "taoensso/telemere/timbre.cljc", :line 89, :arglists ([& args]), :doc "Prefer `telemere/log!`, etc.\n", :type :macro} {:name reportf, :file "taoensso/telemere/timbre.cljc", :line 98, :arglists ([& args]), :doc "Prefer `telemere/log!`, etc.\n", :type :macro} {:name set-min-level!, :file "taoensso/telemere/timbre.cljc", :line 145, :arglists ([min-level]), :doc "Prefer `telemere/set-min-level!`.\n", :type :var} {:name set-ns-min-level!, :file "taoensso/telemere/timbre.cljc", :line 153, :arglists ([?min-level] [ns ?min-level]), :doc "Prefer `telemere/set-min-level!`.\n", :type :macro} {:name shutdown-appenders!, :file "taoensso/telemere/timbre.cljc", :line 161, :arglists ([]), :doc "Prefer `telemere/shut-down-handlers!`.\n", :type :var} {:name spy!, :file "taoensso/telemere/timbre.cljc", :line 101, :arglists ([form] [level form] [level form-name form]), :doc "Prefer `telemere/spy!`.\n", :type :macro} {:name trace, :file "taoensso/telemere/timbre.cljc", :line 83, :arglists ([& args]), :doc "Prefer `telemere/log!`, etc.\n", :type :macro} {:name tracef, :file "taoensso/telemere/timbre.cljc", :line 92, :arglists ([& args]), :doc "Prefer `telemere/log!`, etc.\n", :type :macro} {:name warn, :file "taoensso/telemere/timbre.cljc", :line 86, :arglists ([& args]), :doc "Prefer `telemere/log!`, etc.\n", :type :macro} {:name warnf, :file "taoensso/telemere/timbre.cljc", :line 95, :arglists ([& args]), :doc "Prefer `telemere/log!`, etc.\n", :type :macro} {:name with-context, :file "taoensso/telemere/timbre.cljc", :line 158, :arglists ([context & body]), :doc "Prefer `telemere/with-ctx`.\n", :type :macro} {:name with-context+, :file "taoensso/telemere/timbre.cljc", :line 159, :arglists ([context & body]), :doc "Prefer `telemere/with-ctx+`.\n", :type :macro} {:name with-min-level, :file "taoensso/telemere/timbre.cljc", :line 147, :arglists ([min-level & body]), :doc "Prefer `telemere/with-min-level`.\n", :type :macro}), :doc "Main Timbre macros, reimplemented on top of Telemere.\nIntended to help ease migration from Timbre to Telemere."} {:name taoensso.telemere.utils, :publics ({:name error-in-signal->maps, :file "taoensso/telemere/utils.cljc", :line 112, :arglists ([signal]), :doc "Experimental, subject to change.\nReturns given signal with possible `:error` replaced by\n[{:keys [type msg data]} ...] cause chain.\n\nUseful when serializing signals to edn/JSON/etc.", :type :var} {:name error-signal?, :file "taoensso/telemere/utils.cljc", :line 95, :arglists ([signal]), :doc "Experimental, subject to change.\nReturns true iff given signal has an `:error` value, or a `:kind` or `:level`\nthat indicates that it's an error.", :type :var} {:name file-writer, :file "taoensso/telemere/utils.cljc", :line 176, :arglists ([file append?]), :doc "Experimental, subject to change!!\n\nOpens the specified file and returns a stateful fn of 2 arities:\n [content] => Writes given content to file, or no-ops if closed.\n [] => Closes the writer.\n\nThread safe. Automatically creates file and parent dirs as necessary.\nWriters MUST ALWAYS be manually closed after use!\n\nUseful for handlers that write to files, etc.", :type :var} {:name format-error-fn, :file "taoensso/telemere/utils.cljc", :line 272, :arglists ([] [{:as _opts}]), :doc "Experimental, subject to change.\nReturns a (fn format [error]) that:\n - Takes a platform error (`Throwable` or `js/Error`).\n - Returns a formatted human-readable string", :type :var} {:name format-inst-fn, :file "taoensso/telemere/utils.cljc", :line 256, :arglists ([] [{:keys [formatter zone], :or {formatter java.time.format.DateTimeFormatter/ISO_INSTANT, zone java.time.ZoneOffset/UTC}}]), :added "Encore v3.98.0 (2024-04-08)", :doc "Experimental, subject to change without notice.\n\nReturns a (fn format [instant]) that:\n - Takes a platform instant (`java.time.Instant` or `js/Date`).\n - Returns a formatted human-readable string.\n\nOptions:\n `:zone` (Clj only) `java.time.ZoneOffset` (defaults to UTC).\n `:formatter`\n `java.time.format.DateTimeFormatter` (Clj) or\n `goog.i18n.DateTimeFormat` (Cljs),\n\n Defaults to `ISO8601` formatter (`YYYY-MM-DDTHH:mm:ss.sssZ`),\n e.g.: \"2011-12-03T10:15:130Z\".", :type :var} {:name format-nsecs-fn, :file "taoensso/telemere/utils.cljc", :line 245, :arglists ([] [{:as _opts}]), :doc "Experimental, subject to change.\nReturns a (fn format [nanosecs]) that:\n - Takes a long nanoseconds (e.g. runtime).\n - Returns a formatted human-readable string like:\n \"1.00m\", \"4.20s\", \"340ms\", \"822μs\", etc.", :type :var} {:name format-signal->edn-fn, :file "taoensso/telemere/utils.cljc", :line 392, :arglists ([] [{:keys [pr-edn-fn prep-fn], :or {pr-edn-fn pr-edn, prep-fn (comp error-in-signal->maps minify-signal)}}]), :doc "Experimental, subject to change.\nReturns a (fn format->edn [signal]) that:\n - Takes a Telemere signal.\n - Returns edn string of the (minified) signal.", :type :var} {:name format-signal->json-fn, :file "taoensso/telemere/utils.cljc", :line 409, :arglists ([] [{:keys [pr-json-fn prep-fn], :or {prep-fn (comp error-in-signal->maps minify-signal)}}]), :doc "Experimental, subject to change.\nReturns a (fn format->json [signal]) that:\n - Takes a Telemere signal.\n - Returns JSON string of the (minified) signal.\n\n(Clj only): An appropriate `:pr-json-fn` MUST be provided.", :type :var} {:name format-signal->str-fn, :file "taoensso/telemere/utils.cljc", :line 432, :arglists ([] [{:keys [format-signal-prelude-fn format-nsecs-fn format-error-fn], :or {format-signal-prelude-fn (format-signal-prelude-fn), format-nsecs-fn (format-nsecs-fn), format-error-fn (format-error-fn)}}]), :doc "Experimental, subject to change.\nReturns a (fn format->str [signal]) that:\n - Takes a Telemere signal.\n - Returns a formatted string intended for text consoles, etc.", :type :var} {:name format-signal-prelude-fn, :file "taoensso/telemere/utils.cljc", :line 307, :arglists ([] [{:keys [format-inst-fn], :or {format-inst-fn (format-inst-fn)}}]), :doc "Experimental, subject to change.\nReturns a (fn format [signal]) that:\n - Takes a Telemere signal.\n - Returns a formatted prelude string like:\n \"2024-03-26T11:14:51.806Z INFO EVENT Hostname taoensso.telemere(2,21) ::ev-id - msg\"", :type :var} {:name host-ip, :file "taoensso/telemere/utils.cljc", :line 61, :arglists ([timeout-msecs timeout-val] []), :doc "Returns cached local host IP address string, or `timeout-val` (default \"UnknownHost\").\n", :type :var} {:name hostname, :file "taoensso/telemere/utils.cljc", :line 67, :arglists ([timeout-msecs timeout-val] []), :doc "Returns cached local hostname string, or `timeout-val` (default \"UnknownHost\").\n", :type :var} {:name minify-signal, :file "taoensso/telemere/utils.cljc", :line 126, :arglists ([signal]), :doc "Experimental, subject to change.\nReturns minimal signal map, removing:\n - Keys with nil values, and\n - Keys with redundant values (`:kvs`, `:location`, `:file`).\n\nUseful when serializing signals to edn/JSON/etc.", :type :var} {:name newline, :file "taoensso/telemere/utils.cljc", :line 53, :added "Encore v3.68.0 (2023-09-25)", :doc "Single system newline\n", :type :var} {:name pr-edn, :file "taoensso/telemere/utils.cljc", :line 53, :arglists ([x]), :doc "Prints given arg to an edn string readable with `read-edn`.\n", :type :var} {:name thread-id, :file "taoensso/telemere/utils.cljc", :line 56, :arglists ([]), :doc "Returns long id of current thread.\n", :type :var} {:name thread-name, :file "taoensso/telemere/utils.cljc", :line 55, :arglists ([]), :doc "Returns string name of current thread.\n", :type :var}), :doc "Misc utils useful for Telemere handlers, middleware, etc.\n"}), "cljs" ({:name taoensso.telemere, :doc "Structured telemetry for Clojure/Script applications.\n\nSee the GitHub page (esp. Wiki) for info on motivation and design:\n ", :author "Peter Taoussanis (@ptaoussanis)", :publics ({:name *ctx*, :file "taoensso/telemere.cljc", :line 121, :dynamic true, :doc "Dynamic context: arbitrary user-level state attached as `:ctx` to all signals.\nValue may be any type, but is usually nil or a map.\n\nRe/bind dynamic value using `with-ctx`, `with-ctx+`, or `binding`.\nModify root (base) value using `set-ctx!`.\nDefault root (base) value is `default-ctx`.\n\nNote that as with all dynamic Clojure vars, \"binding conveyance\" applies\nwhen using futures, agents, etc.\n\nTips:\n - Value may be (or may contain) an atom if you want mutable semantics\n - Value may be of form { } for custom scoping, etc.", :type :var} {:name *middleware*, :file "taoensso/telemere.cljc", :line 166, :dynamic true, :doc "Optional vector of unary middleware fns to apply (sequentially/left-to-right)\nto each signal before passing it to handlers. If any middleware fn returns nil,\naborts immediately without calling handlers.\n\nUseful for transforming each signal before handling.\n\nRe/bind dynamic value using `with-middleware`, `binding`.\nModify root (base) value using `set-middleware!`.", :type :var} {:name add-handler!, :file "taoensso/telemere.cljc", :line 49, :arglists ([handler-id handler-fn] [handler-id handler-fn dispatch-opts]), :doc "Registers given signal handler and returns\n{ {:keys [dispatch-opts handler-fn]}} for all signal handlers\nnow registered.\n\n`handler-fn` should be a fn of 1-2 arities:\n\n ([handler-arg]) => Handle the given argument (e.g. write to disk/db, etc.)\n ([]) => Optional arity, called exactly once on system shutdown.\n Provides an opportunity for handler to close/release\n any resources that it may have opened/acquired.\n\nSee the relevant docstring/s for `handler-arg` details.\n\nHandler ideas:\n\n Save to a db, `tap>`, log, `put!` to an appropriate `core.async`\n channel, filter, aggregate, use for a realtime analytics dashboard,\n examine for outliers or unexpected data, etc.\n\nDispatch options include:\n\n `async` (Clj only)\n Options for running handler asynchronously via `taoensso.encore/runner`,\n {:keys [mode buffer-size n-threads daemon-threads? ...]}\n\n Supports `:blocking`, `:dropping`, and `:sliding` back-pressure modes.\n NB handling order may be non-sequential when `n-threads` > 1.\n\n Default:\n {:mode :dropping, :buffer-size 4096, :n-threads 1, :daemon-threads? false}\n\n Options:\n `mode` - Mode of operation, ∈ #{:sync :blocking :dropping :sliding}.\n `buffer-size` - Size of buffer before back-pressure mechanism is engaged.\n `n-threads` - Number of threads for asynchronously executing fns.\n NB execution order may be non-sequential when n > 1.\n\n `priority`\n Optional handler priority ∈ℤ (default 100). Handlers will be called in\n descending priority order.\n\n `sample-rate`\n Optional sample rate ∈ℝ[0,1], or (fn dyamic-sample-rate []) => ℝ[0,1].\n When present, handle only this (random) proportion of args:\n 1.0 => handle every arg (same as `nil` rate, default)\n 0.0 => noop every arg\n 0.5 => handle random 50% of args\n\n `kind-filter` - Kind filter as in `set-kind-filter!` (when relevant)\n `ns-filter` - Namespace filter as in `set-ns-filter!`\n `id-filter` - Id filter as in `set-id-filter!` (when relevant)\n `min-level` - Minimum level as in `set-min-level!`\n\n `when-fn`\n Optional nullary (fn allow? []) that must return truthy for handler to be\n called. When present, called *after* sampling and other filters, but before\n rate limiting.\n\n `rate-limit`\n Optional rate limit spec as provided to `taoensso.encore/rate-limiter`,\n { [ ]}.\n\n Examples:\n {\"1/sec\" [1 1000]} => Max 1 call per 1000 msecs\n {\"1/sec\" [1 1000]\n \"10/min\" [10 60000]} => Max 1 call per 1000 msecs,\n and 10 calls per 60 secs\n\n `middleware`\n Optional vector of unary middleware fns to apply (left-to-right/sequentially)\n to `handler-arg` before passing to `handler-fn`. If any middleware fn returns\n nil, aborts immediately without calling `handler-fn`.\n\n Useful for transforming `handler-arg` before handling.\n\n `error-fn` - (fn [{:keys [handler-id handler-arg error]}]) to call on handler error.\n `backp-fn` - (fn [{:keys [handler-id ]}]) to call on handler back-pressure.\n\nFlow sequence:\n\n 1. Per call (n=1)\n a. Sampling\n b. Filtering (kind, namespace, id, level, when-form)\n c. Rate limiting\n d. Middleware\n\n 2. Per handler (n>=0)\n a. Sampling\n b. Filtering (kind, namespace, id, level, when-fn)\n c. Rate limiting\n d. Middleware\n e. Hander fn\n\n Note: call filters should generally be at least as permissive as handler filters,\n otherwise calls will be suppressed before reaching handlers.", :type :var} {:name catch->error!, :file "taoensso/telemere.cljc", :line 262, :arglists ([form] [id form] [{:as opts, :keys [rethrow? catch-val elidable? location inst uid middleware sample-rate kind ns id level when rate-limit ctx parent trace? do let data msg error & kvs]} form]), :doc "Unconditionally executes given form and-\n If form succeeds: return the form's result.\n If form throws:\n Call `error!` with the thrown error and the given signal options [2],\n then return (:catch-val opts) if it exists, or rethrow the error.\n\nAPI: [form] [id-or-opts form] => form's result (value/throw) (unconditional), or (:catch-val opts)\nDefault kind: `:error`\nDefault level: `:error`\n\nExamples:\n\n (catch->error! (/ 1 0)) ; %> {:kind :error, :level :error, :error ...}\n (catch->error! ::my-id (/ 1 0)) ; %> {... :id ::my-id ...}\n (catch->error!\n {:let [x \"x\"] ; Available to `:data` and `:msg`\n :data {:x x}\n :msg [\"My msg:\" x my-error]\n :catch-val \"Return value when form throws\"\n :catch-sym my-error ; Sym of caught error, available to `:data` and `:msg`\n }\n\n (/ 1 0)) ; %> {... :data {x \"x\"}, :msg_ \"My msg: x \" ...}\n\nTips:\n\n - Test using `with-signal`: (with-signal (catch->error! ...)).\n - Supports the same options [2] as other signals [1].\n\n - Useful for recording errors in forms, futures, callbacks, etc.\n\nSee also `error!`.\n\n-------------------------------------------------------------------\n[1] See `help:signal-creators` - (`signal!`, `log!`, `event!`, ...)\n[2] See `help:signal-options` - {:keys [kind level id data ...]}\n[3] See `help:signal-content` - {:keys [kind level id data ...]}\n[4] See `help:signal-flow` - (filters, handling, etc.)", :type :macro} {:name chance, :file "taoensso/telemere.cljc", :line 86, :arglists ([prob]), :doc "Returns true with given probability ∈ ℝ[0,1].\n", :type :var} {:name default-ctx, :file "taoensso/telemere.cljc", :line 113, :doc "Default root (base) value of `*ctx*` var.\nDefaults to `nil`, controlled by:\n (get-env {:as :edn} :taoensso.telemere/default-ctx<.platform><.edn>)\n\nSee `get-env` for details.", :type :var} {:name error!, :file "taoensso/telemere.cljc", :line 245, :arglists ([error] [id error] [{:as opts, :keys [elidable? location inst uid middleware sample-rate kind ns id level when rate-limit ctx parent trace? do let data msg error & kvs]} error]), :doc "\"Error\" signal creator, emphasizing error + id.\n\nAPI: [error] [id-or-opts error] => given error (unconditional)\nDefault kind: `:error`\nDefault level: `:error`\n\nExamples:\n\n (throw (error! (ex-info \"MyEx\" {}))) ; %> {:kind :error, :level :error, :error ...}\n (throw (error! ::my-id (ex-info \"MyEx\" {}))) ; %> {... :id ::my-id ...}\n (throw\n (error!\n {:let [x \"x\"] ; Available to `:data` and `:msg`\n :data {:x x}\n :msg [\"My message:\" x]}\n\n (ex-info \"MyEx\" {}))) ; %> {... :data {x \"x\"}, :msg_ \"My msg: x\" ...}\n\nTips:\n\n - Test using `with-signal`: (with-signal (error! ...)).\n - Supports the same options [2] as other signals [1].\n\n - `error` arg is a platform error (`java.lang.Throwable` or `js/Error`).\n - Can conveniently be wrapped by `throw`: (throw (error! ...)).\n\n-------------------------------------------------------------------\n[1] See `help:signal-creators` - (`signal!`, `log!`, `event!`, ...)\n[2] See `help:signal-options` - {:keys [kind level id data ...]}\n[3] See `help:signal-content` - {:keys [kind level id data ...]}\n[4] See `help:signal-flow` - (filters, handling, etc.)", :type :macro} {:name error-signal?, :file "taoensso/telemere.cljc", :line 86, :arglists ([signal]), :doc "Experimental, subject to change.\nReturns true iff given signal has an `:error` value, or a `:kind` or `:level`\nthat indicates that it's an error.", :type :var} {:name event!, :file "taoensso/telemere.cljc", :line 223, :arglists ([id] [id level] [id {:as opts, :keys [elidable? location inst uid middleware sample-rate kind ns id level when rate-limit ctx parent trace? do let data msg error & kvs]}]), :doc "\"Event\" signal creator, emphasizing id + level.\n\nAPI: [id] [id level-or-opts] => true iff signal was allowed\nDefault kind: `:event`\nDefault level: `:info`\n\nWhen filtering conditions are met [4], creates a Telemere signal [3] and\ndispatches it to registered handlers for processing (e.g. writing to\nconsole/file/queue/db, etc.).\n\nExamples:\n\n (event! ::my-id) ; %> {:kind :event, :level :info, :id ::my-id ...}\n (event! ::my-id :warn) ; %> {... :level :warn ...}\n (event! ::my-id\n {:let [x \"x\"] ; Available to `:data` and `:msg`\n :data {:x x}\n :msg [\"My msg:\" x]}) ; %> {... :data {x \"x\"}, :msg_ \"My msg: x\" ...}\n\nTips:\n\n - Test using `with-signal`: (with-signal (event! ...)).\n - Supports the same options [2] as other signals [1].\n\n - `log!` and `event!` are both good default/general-purpose signal creators.\n - `log!` emphasizes messages, while `event!` emphasizes ids.\n\n - Has a different 2-arity arg order to all other signals!\n Mnemonic: the arg that's typically larger is *always* in the rightmost\n position, and for `event!` that's the `level-or-opts` arg.\n\n-------------------------------------------------------------------\n[1] See `help:signal-creators` - (`signal!`, `log!`, `event!`, ...)\n[2] See `help:signal-options` - {:keys [kind level id data ...]}\n[3] See `help:signal-content` - {:keys [kind level id data ...]}\n[4] See `help:signal-flow` - (filters, handling, etc.)", :type :macro} {:name get-env, :file "taoensso/telemere.cljc", :line 86, :arglists ([{:keys [as default return]} spec] [{:keys [as default return spec], :or {as :str, return :value}}]), :added "Encore v3.75.0 (2024-01-29)", :doc "Cross-platform util for embedding flexible environmental config during\nmacro expansion. Used by other Taoensso libraries.\n\nGiven a const kw/string id or vector of desc-priority alternative ids,\nparse and return the first of the following that exists:\n - JVM property value for id (\"prop\")\n - Environment variable value for id (\"env\")\n - Classpath resource content for id (\"res\")\n\nIds may include optional segment in `<>` tag (e.g. `<.edn>`).\nIds may include `<.?platform.?>` tag for auto replacement, useful\nfor supporting platform-specific config.\n\nSearch order: desc by combined [alt-index platform(y/n) optional(y/n)].\n\n(get-env {:as :edn} [:my-app/alt1<.platform><.edn> :my-app/alt2])\nwill parse and return the first of the following that exists:\n\n 1. Alt1 +platform +optional (content type)\n 1a. `my-app.alt1.clj.edn` JVM property value\n 1b. `MY_APP_ALT1_CLJ_EDN` environment variable value\n 1c. `my-app.alt1.clj.edn` classpath resource content\n\n 2. Alt1 +platform -optional (content type)\n 2a. `my-app.alt1.clj` JVM property value\n 2b. `MY_APP_ALT1_CLJ` environment variable value\n 2c. `my-app.alt1.clj` classpath resource content\n\n 3. Alt1 -platform +optional (content type)\n 3a. `my-app.alt1.edn` JVM property value\n 3b. `MY_APP_ALT1_EDN` environment variable value\n 3c. `my-app.alt1.edn` classpath resource content\n\n 4. Alt1 -platform -optional (content type)\n 4a. `my-app.alt1` JVM property value\n 4b. `MY_APP_ALT1` environment variable value\n 4c. `my-app.alt1` classpath resource content\n\n 5. Alt2\n 5a. `my-app.alt2` JVM property value\n 5b. `MY_APP_ALT2` environment variable value\n 5c. `my-app.alt2` classpath resource content\n\nOptions:\n `:as` - Parse found value as given type ∈ #{:str :bool :edn} (default :str).\n `:default` - Fallback to return if no value found during search (default nil).\n `:return` - Return type ∈ #{:value :map :debug} (default :value).\n TIP: Use `:debug` to inspect/verify search behaviour!\n\nResult must be something that can be safely embedded in code during\nmacro-expansion. Symbols in edn will be evaluated during expansion.", :type :macro} {:name get-filters, :file "taoensso/telemere.cljc", :line 49, :arglists ([]), :doc "Returns current ?{:keys [compile-time runtime]} filter config.\n", :type :var} {:name get-handlers, :file "taoensso/telemere.cljc", :line 49, :arglists ([]), :doc "Returns ?{ {:keys [dispatch-opts handler-fn]}} for all\nregistered signal handlers.", :type :var} {:name get-min-level, :file "taoensso/telemere.cljc", :line 49, :arglists ([] [kind] [kind ns]), :doc "Returns current ?{:keys [compile-time runtime]} minimum levels.\n", :type :var} {:name handler:console, :file "taoensso/telemere.cljc", :line 401, :arglists ([] [{:keys [format-signal-fn], :or {format-signal-fn (utils/format-signal->str-fn)}}]), :doc "Experimental, subject to change.\n\nIf `js/console` exists, returns a (fn handler [signal]) that:\n - Takes a Telemere signal.\n - Writes a formatted signal string to JavaScript console.\n\nOptions:\n `:format-signal-fn` - (fn [signal]) => output, see `help:signal-formatters`", :type :var} {:name handler:console-raw, :file "taoensso/telemere.cljc", :line 401, :arglists ([] [{:keys [format-signal-prelude-fn format-nsecs-fn], :as opts, :or {format-signal-prelude-fn (utils/format-signal-prelude-fn), format-nsecs-fn (utils/format-nsecs-fn)}}]), :doc "Experimental, subject to change.\n\nIf `js/console` exists, returns a (fn handler [signal]) that:\n - Takes a Telemere signal.\n - Writes raw signal data to JavaScript console.\n\nIntended for use with browser formatting tools like `binaryage/devtools`,\nRef. .", :type :var} {:name help:filters, :file "taoensso/telemere.cljc", :line 49, :doc "Your filter config determines which signal calls will be allowed.\n\nFiltering can occur at compile-time (=> elision), or runtime.\nBoth compile-time and runtime config can be specified with:\n\n System values (JVM properties, environment variables, or\n classpath resources) [1].\n\nRuntime config can also be specified with:\n\n `set-kind-filter!`, `with-kind-filter` - for filtering calls by signal kind (when relevant)\n `set-ns-filter!`, `with-ns-filter` - for filtering calls by namespace\n `set-id-filter!`, `with-id-filter` - for filtering calls by signal id (when relevant)\n `set-minimum-level!`, `with-minimum-level!` - for filtering calls by signal level\n\n See the relevant docstrings for details.\n\nFiltering can also be applied per handler, see `add-handler!` for details.\n\nSee also:\n\n `get-filters` - to see current filter config\n `get-min-level` - to see current minimum level\n `without-filters` - to disable all runtime filtering\n\nIf anything is unclear, please ping me (@ptaoussanis) so that I can\nimprove these docs!\n\n[1] These include:\n\n Compile-time:\n\n ns-filter: (get-env {:as :edn} :taoensso.telemere/ct-ns-filter<.platform><.edn>)\n id-filter: (get-env {:as :edn} :taoensso.telemere/ct-id-filter<.platform><.edn>)\n min-level: (get-env {:as :edn} :taoensso.telemere/ct-min-level<.platform><.edn>)\n\n Runtime:\n\n ns-filter: (get-env {:as :edn} :taoensso.telemere/rt-ns-filter<.platform><.edn>)\n id-filter: (get-env {:as :edn} :taoensso.telemere/rt-id-filter<.platform><.edn>)\n min-level: (get-env {:as :edn, :default :info} :taoensso.telemere/rt-min-level<.platform><.edn>)\n\n See `get-env` for details.", :type :var} {:name help:handlers, :file "taoensso/telemere.cljc", :line 49, :doc "Manage handlers with:\n\n `get-handlers` - Returns info on registered handlers\n `shut-down-handlers!` - Shuts down registered handlers\n\n `add-handler!` - Registers given handler\n `remove-handler!` - Unregisters given handler\n\nSee the relevant docstrings for details.\nClj only: `shut-down-handlers!` is called automatically on JVM shutdown.\n\nIf anything is unclear, please ping me (@ptaoussanis) so that I can\nimprove these docs!", :type :var} {:name help:signal-content, :file "taoensso/telemere.cljc", :line 106, :doc "Signals are maps with {:keys [inst id ns level data msg_ ...]},\nthough they can be modified by signal and/or handler middleware.\n\nDefault signal keys:\n\n`:schema` ------ Int version of signal schema (current: 1)\n`:inst` -------- Platform instant [1] when signal was created\n`:level` ------- Signal level ∈ #{ :trace :debug :info :warn :error :fatal :report ...}\n`:kind` -------- Signal ?kind ∈ #{nil :event :error :log :trace :spy ...}\n`:id` ---------- ?id of signal (common to all signals created at callsite, contrast with `:uid`)\n`:uid` --------- ?id of signal instance (unique to each signal created at callsite, contrast with `:id`)\n\n`:msg` --------- Arb user-level message ?str given to signal creator\n`:data` -------- Arb user-level data ?val (usu. a map) given to signal creator\n`:error` ------- Arb user-level platform ?error [2] given to signal creator\n\n`:run-form` ---- Unevaluated ?form given to signal creator as `:run`\n`:run-val` ----- Successful return ?val of `:run` ?form\n`:run-nsecs` --- ?int nanosecs runtime of `:run` ?form\n`:end-inst` ---- Platform ?instant [1] when `:run` ?form completed\n\n`:ctx` --------- ?val of `*ctx*` (arb user-level state) when signal was created\n`:parent` ------ ?{:keys [id uid]} of parent signal, present in nested signals when tracing\n`:location` ---- ?{:keys [ns file line column]} signal creator callsite\n`:ns` ---------- ?str namespace of signal creator callsite, same as (:ns location)\n`:line` -------- ?int line of signal creator callsite, same as (:line location)\n`:column` ------ ?int column of signal creator callsite, same as (:column location)\n`:file` -------- ?str filename of signal creator callsite, same as (:file location)\n`:sample-rate` - ?rate ∈ℝ[0,1] for combined signal AND handler sampling (0.75 => allow 75% of signals, nil => allow all)\n\n ---------- Arb other user-level ?kvs given to signal creator\n\nIf anything is unclear, please ping me (@ptaoussanis) so that I can improve these docs!\n\n[1] `java.time.Instant` or `js/Date`\n[2] `java.lang.Throwable` or `js/Error`", :type :var} {:name help:signal-creators, :file "taoensso/telemere.cljc", :line 103, :doc "Call a Telemere signal creator to conditionally create a signal at that callsite.\n\nWhen filtering conditions are met [4], the call creates a Telemere signal [3]\nand dispatches it to registered handlers for processing (e.g. writing to\nconsole/file/queue/db, etc.).\n\nTelemere doesn't make a hard distinction between different kinds of signals\n(log, event, error, etc.) - they're all just plain Clojure/Script maps with\nvarious keys:\n\n - All signal creators offer the same options [2], and\n - All signal kinds can contain the same content [3]\n\nCreators vary only in in their default options and call APIs (expected args\nand return values), making them more/less convenient for certain use cases:\n\n `log!` ---------- [message + opts/level] => true iff signal was created (allowed)\n `event!` -------- [id + opts/level] => true iff signal was created (allowed)\n `error!` -------- [error + opts/id ] => given error (unconditional)\n `trace!` -------- [form + opts/id ] => form result (value/throw) (unconditional)\n `spy!` ---------- [form + opts/level] => form result (value/throw) (unconditional)\n `catch->error!` - [error + opts/id ] => form value, or given fallback\n `signal!` ------- [ opts ] => depends on options\n\n- `log!` and `event!` are both good default/general-purpose signal creators.\n- `log!` emphasizes messages, while `event!` emphasizes ids.\n- `signal!` is the generic creator, and is used by all the others.\n\n-------------------------------------------------------------------\n[2] See `help:signal-options` - {:keys [kind level id data ...]}\n[3] See `help:signal-content` - {:keys [kind level id data ...]}\n[4] See `help:signal-flow` - (filters, handling, etc.)", :type :var} {:name help:signal-filters, :file "taoensso/telemere.cljc", :line 107, :type :var} {:name help:signal-flow, :file "taoensso/telemere.cljc", :line 105, :doc "A signal will be provided to a handler iff ALL of the following are true:\n 1. Signal (creation) is allowed by compile-time filters\n 2. Signal (creation) is allowed by runtime filters\n 3. Signal (handling) is allowed by handler filters\n\n 4. Signal middleware does not suppress the signal (return nil)\n 5. Handler middleware does not suppress the signal (return nil)\n\nFor 1-3, filtering may depend on (in order):\n Sample rate → namespace → kind → id → level → when form/fn → rate limit\n\nNote that sample rates are multiplicative:\n If a signal is created with 20% sampling and a handler handles 50%\n of given signals, then 10% of possible signals will be handled.\n\n This multiplicative rate is helpfully reflected in each signal's final\n `:sample-rate` value.\n\nFor a visual flowchart, see: Ref. \n\nFor more info:\n - On signal filters, see: `help:signal-filters` docstring\n - On handler filters, see: `help:signal-handlers` docstring\n\nIf anything is unclear, please ping me (@ptaoussanis) so that I can\nimprove these docs!", :type :var} {:name help:signal-formatters, :file "taoensso/telemere.cljc", :line 109, :doc "Common signal formatters include:\n (utils/format-signal-str->fn) {}) ; For human-readable string output (default)\n (utils/format-signal->edn-fn) {}) ; For edn output\n (utils/format-signal->json-fn {}) ; For JSON output\n\nSee relevant docstrings for details.", :type :var} {:name help:signal-handlers, :file "taoensso/telemere.cljc", :line 108, :type :var} {:name help:signal-options, :file "taoensso/telemere.cljc", :line 104, :doc "Signal options (shared by all signal creators):\n\n`:inst` -------- Platform instant [1] when signal was created, ∈ #{nil :auto }\n`:level` ------- Signal level ∈ #{ :trace :debug :info :warn :error :fatal :report ...}\n`:kind` -------- Signal ?kind ∈ #{nil :event :error :log :trace :spy ...}\n`:id` ---------- ?id of signal (common to all signals created at callsite, contrast with `:uid`)\n`:uid` --------- ?id of signal instance (unique to each signal created at callsite, contrast with `:id`)\n\n`:msg` --------- Arb user-level ?message to incl. in signal: str or vec of strs to join (with `\\space`)\n`:data` -------- Arb user-level ?data to incl. in signal: usu. a map\n`:error` ------- Arb user-level ?error to incl. in signal: platform error [2]\n\n`:run` --------- ?form to execute UNCONDITIONALLY; will incl. `:run-value` in signal\n`:do` ---------- ?form to execute conditionally (iff signal allowed), before establishing `:let` ?binding\n`:let` --------- ?bindings to establish conditionally (iff signal allowed), BEFORE evaluating `:data` and `:msg` (useful!)\n\n`:ctx` --------- Custom ?val to override auto (dynamic `*ctx*`) in signal\n`:parent` ------ Custom ?{:keys [id uid]} to override auto (dynamic) parent signal info in signal\n`:location` ---- Custom ?{:keys [ns line column file]} to override auto signal creator callsite location\n\n`:elidable?` --- Should signal be subject to compile-time elision? (Default: true).\n`:sample-rate` - ?rate ∈ℝ[0,1] for signal sampling (0.75 => allow 75% of signals, nil => allow all)\n`:when` -------- Arb ?form; when present, form must return truthy to allow signal\n`:rate-limit` -- ?spec as given to `taoensso.telemere/rate-limiter`, see its docstring for details\n`:middleware` -- ?[(fn [signal])=>modified-signal ...] signal middleware\n`:trace?` ------ Should tracing be enabled for `:run` form?\n\n ---------- Arb other user-level ?kvs to incl. in signal\n\nIf anything is unclear, please ping me (@ptaoussanis) so that I can improve these docs!\n\n[1] `java.time.Instant` or `js/Date`\n[2] `java.lang.Throwable` or `js/Error`", :type :var} {:name level-aliases, :file "taoensso/telemere.cljc", :line 49, :type :var} {:name log!, :file "taoensso/telemere.cljc", :line 234, :arglists ([msg] [level msg] [{:as opts, :keys [elidable? location inst uid middleware sample-rate kind ns id level when rate-limit ctx parent trace? do let data msg error & kvs]} msg]), :doc "\"Log\" signal creator, emphasizing message + level.\n\nAPI: [msg] [level-or-opts msg] => true iff signal was allowed.\nDefault kind: `:log`\nDefault level: `:info`\n\nWhen filtering conditions are met [4], creates a Telemere signal [3] and\ndispatches it to registered handlers for processing (e.g. writing to\nconsole/file/queue/db, etc.).\n\nExamples:\n\n (log! \"My msg\") ; %> {:kind :log, :level :info, :id ::my-id ...}\n (log! :warn \"My msg\") ; %> {... :level :warn ...}\n (log!\n {:let [x \"x\"] ; Available to `:data` and `:msg`\n :data {:x x}}\n\n [\"My msg:\" x]) ; %> {... :data {x \"x\"}, :msg_ \"My msg: x\" ...}\n\nTips:\n\n - Test using `with-signal`: (with-signal (log! ...)).\n - Supports the same options [2] as other signals [1].\n\n - `log!` and `event!` are both good default/general-purpose signal creators.\n - `log!` emphasizes messages, while `event!` emphasizes ids.\n\n - `msg` arg may be a string, or vector of strings to join with `\\space`.\n - See also `msg-splice`, `msg-skip` utils.\n\n-------------------------------------------------------------------\n[1] See `help:signal-creators` - (`signal!`, `log!`, `event!`, ...)\n[2] See `help:signal-options` - {:keys [kind level id data ...]}\n[3] See `help:signal-content` - {:keys [kind level id data ...]}\n[4] See `help:signal-flow` - (filters, handling, etc.)", :type :macro} {:name msg-skip, :file "taoensso/telemere.cljc", :line 86, :type :var} {:name msg-splice, :file "taoensso/telemere.cljc", :line 86, :arglists ([args]), :doc "For use within signal message vectors.\nWraps given arguments so that they're spliced when creating message.\nUseful for conditionally splicing in extra message content, etc.:\n\n (signal! {:msg [(when (msg-splice [\"Username:\" \"Steve\"])) <...>]}) or\n (log! [(when (msg-splice [\"Username:\" \"Steve\"]))])\n\n %> {:msg_ \"Username: Steve\"}", :type :var} {:name newline, :file "taoensso/telemere.cljc", :line 86, :added "Encore v3.68.0 (2023-09-25)", :doc "Single system newline\n", :type :var} {:name rate-limiter, :file "taoensso/telemere.cljc", :line 86, :arglists ([spec] [opts spec]), :doc "Takes a map spec of form { [ ]},\nand returns a basic stateful (fn rate-limiter [req-id] [command req-id]).\n\nCall fn with a single request id (e.g. username) by which to count/limit.\nWill return:\n - nil when all limits pass for that id, or\n - [ { }]\n when any limits fail for that id.\n\nOr call fn with an additional command argument:\n `:rl/peek` - Check limits w/o incrementing count.\n `:rl/reset` - Reset all limits for given req-id.\n\nExample:\n\n (defonce my-rate-limiter\n (rate-limiter\n {\"1 per sec\" [1 1000]\n \"10 per min\" [10 60000]}))\n\n (defn send-message! [username msg-content]\n (if-let [fail (my-rate-limiter username)]\n (throw (ex-info \"Sorry, rate limited!\" {:fail fail}))\n ))", :type :var} {:name remove-handler!, :file "taoensso/telemere.cljc", :line 49, :arglists ([handler-id]), :doc "Deregisters signal handler with given id, and returns\n?{ {:keys [dispatch-opts handler-fn]}} for all signal handlers\nstill registered.", :type :var} {:name set-ctx!, :file "taoensso/telemere.cljc", :line 138, :arglists ([root-val]), :doc "Set `*ctx*` var's root (base) value. See `*ctx*` for details.\n", :type :macro} {:name set-id-filter!, :file "taoensso/telemere.cljc", :line 49, :arglists ([id-filter]), :doc "Sets signal call id filter based on given `id-filter` spec.\n`id-filter` may be:\n\n - A regex pattern of id/s to allow.\n - A str/kw/sym, in which \"*\"s act as wildcards.\n - A vector or set of regex patterns or strs/kws/syms.\n - {:allow :deny } with specs as above.\n If present, `:allow` spec MUST match, AND\n If present, `:deny` spec MUST NOT match.", :type :var} {:name set-kind-filter!, :file "taoensso/telemere.cljc", :line 49, :arglists ([kind-filter]), :doc "Sets signal call kind filter based on given `kind-filter` spec.\n`kind-filter` may be:\n\n - A regex pattern of kind/s to allow.\n - A str/kw/sym, in which \"*\"s act as wildcards.\n - A vector or set of regex patterns or strs/kws/syms.\n - {:allow :deny } with specs as above.\n If present, `:allow` spec MUST match, AND\n If present, `:deny` spec MUST NOT match.", :type :var} {:name set-middleware!, :file "taoensso/telemere.cljc", :line 178, :arglists ([root-val]), :doc "Set `*middleware*` var's root (base) value. See `*middleware*` for details.\n", :type :macro} {:name set-min-level!, :file "taoensso/telemere.cljc", :line 49, :arglists ([min-level] [kind min-level] [kind ns-filter min-level]), :doc "Sets minimum signal call level based on given `min-level` spec.\n`min-level` may be:\n\n - An integer.\n - A level keyword (see `level-aliases` var for details).\n\nIf `ns-filter` is provided, then the given minimum level\nwill apply only for namespaces that match `ns-filter`.\nSee `set-ns-filter!` for details.\n\nIf non-nil `kind` is provided, then the given minimum level\nwill apply only for that signal kind.", :type :var} {:name set-ns-filter!, :file "taoensso/telemere.cljc", :line 49, :arglists ([ns-filter]), :doc "Sets signal call namespace filter based on given `ns-filter` spec.\n`ns-filter` may be:\n\n - A regex pattern of namespace/s to allow.\n - A str/kw/sym, in which \"*\"s act as wildcards.\n - A vector or set of regex patterns or strs/kws/syms.\n - {:allow :deny } with specs as above.\n If present, `:allow` spec MUST match, AND\n If present, `:deny` spec MUST NOT match.", :type :var} {:name set-var-root!, :file "taoensso/telemere.cljc", :line 86, :arglists ([var-sym root-val]), :added "Encore v3.75.0 (2024-01-29)", :doc "Sets root binding (value) of the var identified by given symbol, and returns\nthe new value. Cross-platform. See also `update-var-root!`.", :type :macro} {:name shut-down-handlers!, :file "taoensso/telemere.cljc", :line 49, :arglists ([]), :doc "Shuts down all registered signal handlers and returns\n?{ {:keys [okay error]}}.\n\nFuture calls to handlers will no-op.\nClj only: `shut-down-handlers!` is called automatically on JVM shutdown.", :type :var} {:name signal!, :file "taoensso/telemere.cljc", :line 86, :arglists ([{:as opts, :keys [elidable? location inst uid middleware sample-rate kind ns id level when rate-limit ctx parent trace? do let data msg error run & kvs]}]), :doc "Low-level generic signal creator.\n\nAPI: [opts] => depends on options [2]\nDefault kind: none (optional)\nDefault level: none (must be provided)\n\nWhen filtering conditions are met [4], creates a Telemere signal [3] and\ndispatches it to registered handlers for processing (e.g. writing to\nconsole/file/queue/db, etc.).\n\nIf `:run` option is provided: returns value of given run form, or throws.\n Otherwise: returns true iff signal was created (allowed).\n\nGeneric signals are fairly low-level and useful mostly for library authors or\nadvanced users writing their own wrapper macros. Regular users will typically\nprefer one of the higher-level signal creators optimized for ease-of-use in\ncommon cases [1].\n\nTips:\n\n - Test using `with-signal`: (with-signal (signal! ...)).\n - Supports the same options [2] as other signals [1].\n\n-------------------------------------------------------------------\n[1] See `help:signal-creators` - (`signal!`, `log!`, `event!`, ...)\n[2] See `help:signal-options` - {:keys [kind level id data ...]}\n[3] See `help:signal-content` - {:keys [kind level id data ...]}\n[4] See `help:signal-flow` - (filters, handling, etc.)", :type :macro} {:name spy!, :file "taoensso/telemere.cljc", :line 313, :arglists ([form] [id form] [{:as opts, :keys [elidable? location inst uid middleware sample-rate kind ns id level when rate-limit ctx parent trace? do let data msg error run & kvs]} form]), :doc "\"Spy\" signal creator, emphasizing form + level.\n\nAPI: [form] [level-or-opts form] => form's result (value/throw) (unconditional)\nDefault kind: `:spy`\nDefault level: `:info`\n\nWhen filtering conditions are met [4], creates a Telemere signal [3] and\ndispatches it to registered handlers for processing (e.g. writing to\nconsole/file/queue/db, etc.).\n\nExamples:\n\n (spy! (+ 1 2)) ; %> {:kind :trace, :level :info, :run-form '(+ 1 2),\n ; :run-val 3, :run-nsecs , :parent {:keys [id uid]}\n ; :msg \"(+ 1 2) => 3\" ...}\n (spy! ::my-id (+ 1 2)) ; %> {... :id ::my-id ...}\n (spy!\n {:let [x \"x\"] ; Available to `:data` and `:msg`\n :data {:x x}}\n\n (+ 1 2)) ; %> {... :data {x \"x\"}, :msg_ \"My msg: x\" ...}\n\nTips:\n\n - Test using `with-signal`: (with-signal (spy! ...)).\n - Supports the same options [2] as other signals [1].\n\n - Identical to `trace!`, but emphasizes form + level rather than form + id.\n\n - Useful for debugging/monitoring forms, and tracing (nested) execution flow.\n - Execution of `form` arg may create additional (nested) signals.\n Each signal's `:parent` key will indicate its immediate parent.\n\n - Can be useful to wrap with `catch->error!`:\n (catch->error! ::error-id (spy! ...)).\n\n-------------------------------------------------------------------\n[1] See `help:signal-creators` - (`signal!`, `log!`, `event!`, ...)\n[2] See `help:signal-options` - {:keys [kind level id data ...]}\n[3] See `help:signal-content` - {:keys [kind level id data ...]}\n[4] See `help:signal-flow` - (filters, handling, etc.)", :type :macro} {:name trace!, :file "taoensso/telemere.cljc", :line 286, :arglists ([form] [id form] [{:as opts, :keys [elidable? location inst uid middleware sample-rate kind ns id level when rate-limit ctx parent trace? do let data msg error run & kvs]} form]), :doc "\"Trace\" signal creator, emphasizing form + id.\n\nAPI: [form] [id-or-opts form] => form's result (value/throw) (unconditional)\nDefault kind: `:trace`\nDefault level: `:info` (intentionally NOT `:trace`!)\n\nWhen filtering conditions are met [4], creates a Telemere signal [3] and\ndispatches it to registered handlers for processing (e.g. writing to\nconsole/file/queue/db, etc.).\n\nExamples:\n\n (trace! (+ 1 2)) ; %> {:kind :trace, :level :info, :run-form '(+ 1 2),\n ; :run-val 3, :run-nsecs , :parent {:keys [id uid]} ...\n ; :msg \"(+ 1 2) => 3\" ...}\n (trace! ::my-id (+ 1 2)) ; %> {... :id ::my-id ...}\n (trace!\n {:let [x \"x\"] ; Available to `:data` and `:msg`\n :data {:x x}}\n\n (+ 1 2)) ; %> {... :data {x \"x\"}, :msg_ \"My msg: x\" ...}\n\nTips:\n\n - Test using `with-signal`: (with-signal (trace! ...)).\n - Supports the same options [2] as other signals [1].\n\n - Identical to `spy!`, but emphasizes form + id rather than form + level.\n\n - Useful for debugging/monitoring forms, and tracing (nested) execution flow.\n - Execution of `form` arg may create additional (nested) signals.\n Each signal's `:parent` key will indicate its immediate parent.\n\n - Can be useful to wrap with `catch->error!`:\n (catch->error! ::error-id (trace! ...)).\n\n - Default level is `:info`, not `:trace`! The name \"trace\" in \"trace signal\"\n refers to the general action of tracing program flow rather than to the\n common logging level of the same name.\n\n-------------------------------------------------------------------\n[1] See `help:signal-creators` - (`signal!`, `log!`, `event!`, ...)\n[2] See `help:signal-options` - {:keys [kind level id data ...]}\n[3] See `help:signal-content` - {:keys [kind level id data ...]}\n[4] See `help:signal-flow` - (filters, handling, etc.)", :type :macro} {:name uncaught->error!, :file "taoensso/telemere.cljc", :line 334, :arglists ([] [id] [{:as opts, :keys [elidable? location inst uid middleware sample-rate kind ns id level when rate-limit ctx parent trace? do let data msg error & kvs]}]), :doc "Uses `uncaught->handler!` so that `error!` will be called for\nuncaught JVM errors.\n\nSee `uncaught->handler!` and `error!` for details.", :type :macro} {:name update-var-root!, :file "taoensso/telemere.cljc", :line 86, :arglists ([var-sym update-fn]), :added "Encore v3.68.0 (2023-09-25)", :doc "Updates root binding (value) of the var identified by given symbol, and returns\nthe new value:\n (update-var-root! my-var (fn [old-root-val] )) => \n\nSimilar to `alter-var-root` but cross-platform and takes a symbol rather than a var.\nSee also `set-var-root!`.", :type :macro} {:name with-ctx, :file "taoensso/telemere.cljc", :line 143, :arglists ([init-val form]), :doc "Evaluates given form with given `*ctx*` value. See `*ctx*` for details.\n", :type :macro} {:name with-ctx+, :file "taoensso/telemere.cljc", :line 150, :arglists ([update-map-or-fn form]), :doc "Evaluates given form with updated `*ctx*` value.\n\n`update-map-or-fn` may be:\n - A map to merge with current `*ctx*` value, or\n - A unary fn to apply to current `*ctx*` value\n\nSee `*ctx*` for details.", :type :macro} {:name with-err->telemere, :file "taoensso/telemere.cljc", :line 370, :arglists ([form] [opts form]), :doc "Executes form with `*err*` bound to flush to Telemere signals with given opts.\n", :type :macro} {:name with-handler, :file "taoensso/telemere.cljc", :line 49, :arglists ([handler-id handler-fn dispatch-opts form]), :doc "Executes form with ONLY the given handler-fn registered.\nUseful for tests/debugging. See also `with-handler+`.", :type :macro} {:name with-handler+, :file "taoensso/telemere.cljc", :line 49, :arglists ([handler-id handler-fn dispatch-opts form]), :doc "Executes form with the given handler-fn registered.\nUseful for tests/debugging. See also `with-handler`.", :type :macro} {:name with-id-filter, :file "taoensso/telemere.cljc", :line 49, :arglists ([id-filter form]), :doc "Executes form with given signal call id filter in effect.\nSee `set-id-filter!` for details.", :type :macro} {:name with-kind-filter, :file "taoensso/telemere.cljc", :line 49, :arglists ([kind-filter form]), :doc "Executes form with given signal call kind filter in effect.\nSee `set-kind-filter!` for details.", :type :macro} {:name with-middleware, :file "taoensso/telemere.cljc", :line 183, :arglists ([init-val form]), :doc "Evaluates given form with given `*middleware*` value.\nSee `*middleware*` for details.", :type :macro} {:name with-min-level, :file "taoensso/telemere.cljc", :line 49, :arglists ([min-level form] [kind min-level form] [kind ns-filter min-level form]), :doc "Executes form with given minimum signal call level in effect.\nSee `set-min-level!` for details.", :type :macro} {:name with-ns-filter, :file "taoensso/telemere.cljc", :line 49, :arglists ([ns-filter form]), :doc "Executes form with given signal call namespace filter in effect.\nSee `set-ns-filter!` for details.", :type :macro} {:name with-out->telemere, :file "taoensso/telemere.cljc", :line 370, :arglists ([form] [opts form]), :doc "Executes form with `*out*` bound to flush to Telemere signals with given opts.\n", :type :macro} {:name with-signal, :file "taoensso/telemere.cljc", :line 86, :arglists ([form] [trap-signals? form] [raw-msg? trap-signals? form]), :doc "Experimental.\nExecutes given form, trapping errors. Returns the LAST signal created by form.\nUseful for tests/debugging.\n\nOptions:\n `trap-signals?` (default: false)\n Should ALL signals created by form be trapped to prevent normal dispatch\n to registered handlers?\n\n `raw-msg?` (default: false)\n Should delayed `:msg_` in returned signal be retained as-is?\n Delay is otherwise replaced by realized string.\n\nSee also `with-signals`.", :type :macro} {:name with-signals, :file "taoensso/telemere.cljc", :line 86, :arglists ([form] [trap-signals? form] [raw-msgs? trap-signals? form]), :doc "Experimental.\nLike `with-signal` but returns [[ ] [ ...]].\nUseful for tests/debugging.", :type :macro} {:name with-streams->telemere, :file "taoensso/telemere.cljc", :line 370, :arglists ([form] [{:keys [out err], :or {out default-out-opts, err default-err-opts}} form]), :doc "Executes form with `*out*` and/or `*err*` bound to flush to Telemere signals\nwith given opts.", :type :macro} {:name without-filters, :file "taoensso/telemere.cljc", :line 49, :arglists ([form]), :doc "Executes form without any runtime filters.\n", :type :macro})} {:name taoensso.telemere.timbre, :doc "Main Timbre macros, reimplemented on top of Telemere.\nIntended to help ease migration from Timbre to Telemere.", :publics ({:name set-min-level!, :file "taoensso/telemere/timbre.cljc", :line 145, :arglists ([min-level]), :doc "Prefer `telemere/set-min-level!`.\n", :type :var} {:name shutdown-appenders!, :file "taoensso/telemere/timbre.cljc", :line 161, :arglists ([]), :doc "Prefer `telemere/shut-down-handlers!`.\n", :type :var})} {:name taoensso.telemere.utils, :doc "Misc utils useful for Telemere handlers, middleware, etc.\n", :publics ({:name error-in-signal->maps, :file "taoensso/telemere/utils.cljc", :line 112, :arglists ([signal]), :doc "Experimental, subject to change.\nReturns given signal with possible `:error` replaced by\n[{:keys [type msg data]} ...] cause chain.\n\nUseful when serializing signals to edn/JSON/etc.", :type :var} {:name error-signal?, :file "taoensso/telemere/utils.cljc", :line 95, :arglists ([signal]), :doc "Experimental, subject to change.\nReturns true iff given signal has an `:error` value, or a `:kind` or `:level`\nthat indicates that it's an error.", :type :var} {:name format-error-fn, :file "taoensso/telemere/utils.cljc", :line 272, :arglists ([] [{:as _opts}]), :doc "Experimental, subject to change.\nReturns a (fn format [error]) that:\n - Takes a platform error (`Throwable` or `js/Error`).\n - Returns a formatted human-readable string", :type :var} {:name format-inst-fn, :file "taoensso/telemere/utils.cljc", :line 256, :arglists ([] [{:keys [formatter]}]), :added "Encore v3.98.0 (2024-04-08)", :doc "Experimental, subject to change without notice.\n\nReturns a (fn format [instant]) that:\n - Takes a platform instant (`java.time.Instant` or `js/Date`).\n - Returns a formatted human-readable string.\n\nOptions:\n `:zone` (Clj only) `java.time.ZoneOffset` (defaults to UTC).\n `:formatter`\n `java.time.format.DateTimeFormatter` (Clj) or\n `goog.i18n.DateTimeFormat` (Cljs),\n\n Defaults to `ISO8601` formatter (`YYYY-MM-DDTHH:mm:ss.sssZ`),\n e.g.: \"2011-12-03T10:15:130Z\".", :type :var} {:name format-nsecs-fn, :file "taoensso/telemere/utils.cljc", :line 245, :arglists ([] [{:as _opts}]), :doc "Experimental, subject to change.\nReturns a (fn format [nanosecs]) that:\n - Takes a long nanoseconds (e.g. runtime).\n - Returns a formatted human-readable string like:\n \"1.00m\", \"4.20s\", \"340ms\", \"822μs\", etc.", :type :var} {:name format-signal->edn-fn, :file "taoensso/telemere/utils.cljc", :line 392, :arglists ([] [{:keys [pr-edn-fn prep-fn], :or {pr-edn-fn pr-edn, prep-fn (comp error-in-signal->maps minify-signal)}}]), :doc "Experimental, subject to change.\nReturns a (fn format->edn [signal]) that:\n - Takes a Telemere signal.\n - Returns edn string of the (minified) signal.", :type :var} {:name format-signal->json-fn, :file "taoensso/telemere/utils.cljc", :line 409, :arglists ([] [{:keys [pr-json-fn prep-fn], :or {pr-json-fn pr-json, prep-fn (comp error-in-signal->maps minify-signal)}}]), :doc "Experimental, subject to change.\nReturns a (fn format->json [signal]) that:\n - Takes a Telemere signal.\n - Returns JSON string of the (minified) signal.\n\n(Clj only): An appropriate `:pr-json-fn` MUST be provided.", :type :var} {:name format-signal->str-fn, :file "taoensso/telemere/utils.cljc", :line 432, :arglists ([] [{:keys [format-signal-prelude-fn format-nsecs-fn format-error-fn], :or {format-signal-prelude-fn (format-signal-prelude-fn), format-nsecs-fn (format-nsecs-fn), format-error-fn (format-error-fn)}}]), :doc "Experimental, subject to change.\nReturns a (fn format->str [signal]) that:\n - Takes a Telemere signal.\n - Returns a formatted string intended for text consoles, etc.", :type :var} {:name format-signal-prelude-fn, :file "taoensso/telemere/utils.cljc", :line 307, :arglists ([] [{:keys [format-inst-fn], :or {format-inst-fn (format-inst-fn)}}]), :doc "Experimental, subject to change.\nReturns a (fn format [signal]) that:\n - Takes a Telemere signal.\n - Returns a formatted prelude string like:\n \"2024-03-26T11:14:51.806Z INFO EVENT Hostname taoensso.telemere(2,21) ::ev-id - msg\"", :type :var} {:name js-console-logger, :file "taoensso/telemere/utils.cljc", :line 75, :arglists ([level]), :doc "Returns JavaScript console logger to match given signal level:\n `:trace` -> `js/console.trace`,\n `:error` -> `js/console.error`, etc.\n\nDefaults to `js.console.log` for unmatched signal levels.\nNB: assumes that `js/console` exists, handler constructors should check first!", :type :var} {:name minify-signal, :file "taoensso/telemere/utils.cljc", :line 126, :arglists ([signal]), :doc "Experimental, subject to change.\nReturns minimal signal map, removing:\n - Keys with nil values, and\n - Keys with redundant values (`:kvs`, `:location`, `:file`).\n\nUseful when serializing signals to edn/JSON/etc.", :type :var} {:name newline, :file "taoensso/telemere/utils.cljc", :line 53, :added "Encore v3.68.0 (2023-09-25)", :doc "Single system newline\n", :type :var} {:name pr-edn, :file "taoensso/telemere/utils.cljc", :line 53, :arglists ([x]), :doc "Prints given arg to an edn string readable with `read-edn`.\n", :type :var} {:name pr-json, :file "taoensso/telemere/utils.cljc", :line 53, :arglists ([x]), :added "Encore v3.98.0 (2024-04-08)", :doc "Returns given Cljs argument as JSON string.\n", :type :var})})}, :pom-str "\n\n 4.0.0\n com.taoensso.debug\n telemere\n jar\n 1.0.0-beta1-f01\n telemere\n Structured telemetry library for Clojure/Script\n https://www.taoensso.com/telemere\n \n \n Eclipse Public License - v 1.0\n https://www.eclipse.org/legal/epl-v10.html\n \n \n \n https://github.com/taoensso/telemere\n scm:git:git://github.com/taoensso/telemere.git\n scm:git:ssh://git@github.com/taoensso/telemere.git\n 998e3984c61fe1cb41c97d9805b1c433f0c9048b\n \n \n src\n test\n \n \n resources\n \n \n \n \n resources\n \n \n target\n target/classes\n \n \n \n \n central\n https://repo1.maven.org/maven2/\n \n false\n \n \n true\n \n \n \n clojars\n https://repo.clojars.org/\n \n true\n \n \n true\n \n \n \n \n \n \n \n \n com.taoensso\n encore\n 3.101.0\n \n \n org.clojure\n clojurescript\n 1.11.132\n provided\n \n \n org.clojure\n clojure\n 1.11.2\n provided\n \n \n org.clojure\n test.check\n 1.1.1\n test\n \n \n org.clojure\n tools.logging\n 1.3.0\n test\n \n \n org.slf4j\n slf4j-api\n 2.0.13\n test\n \n \n com.taoensso\n slf4j-telemere\n 1.0.0-alpha6\n test\n \n \n io.opentelemetry\n opentelemetry-api\n 1.37.0\n test\n \n \n io.opentelemetry\n opentelemetry-sdk-extension-autoconfigure\n 1.37.0\n test\n \n \n io.opentelemetry\n opentelemetry-exporter-otlp\n 1.37.0\n test\n \n \n\n\n\n"}