[doc] Misc improvements

This commit is contained in:
Peter Taoussanis 2025-02-10 11:00:17 +01:00
parent 35606d971d
commit af14494637
3 changed files with 34 additions and 27 deletions

View file

@ -3,44 +3,50 @@ environment variables, or classpath resources.
Environmental filter config includes:
Kind filter:
1. JVM property: `taoensso.telemere.rt-kind-filter`
2. Env variable: `TAOENSSO_TELEMERE_RT_KIND_FILTER`
3. Classpath resource: `taoensso.telemere.rt-kind-filter`
1. Minimum level (see signal `:level`):
a. JVM property: `taoensso.telemere.rt-min-level`
b. Env variable: `TAOENSSO_TELEMERE_RT_MIN_LEVEL`
c. Classpath resource: `taoensso.telemere.rt-min-level`
Namespace filter:
1. JVM property: `taoensso.telemere.rt-ns-filter`
2. Env variable: `TAOENSSO_TELEMERE_RT_NS_FILTER`
3. Classpath resource: `taoensso.telemere.rt-ns-filter`
2. Namespace filter (see signal `:ns`):
a. JVM property: `taoensso.telemere.rt-ns-filter`
b. Env variable: `TAOENSSO_TELEMERE_RT_NS_FILTER`
c. Classpath resource: `taoensso.telemere.rt-ns-filter`
Id filter:
1. JVM property: `taoensso.telemere.rt-id-filter`
2. Env variable: `TAOENSSO_TELEMERE_RT_ID_FILTER`
3. Classpath resource: `taoensso.telemere.rt-id-filter`
3. Id filter (see signal `:id`):
a. JVM property: `taoensso.telemere.rt-id-filter`
b. Env variable: `TAOENSSO_TELEMERE_RT_ID_FILTER`
c. Classpath resource: `taoensso.telemere.rt-id-filter`
Minimum level:
1. JVM property: `taoensso.telemere.rt-min-level`
2. Env variable: `TAOENSSO_TELEMERE_RT_MIN_LEVEL`
3. Classpath resource: `taoensso.telemere.rt-min-level`
4. Kind filter (signal `:kind`):
a. JVM property: `taoensso.telemere.rt-kind-filter`
b. Env variable: `TAOENSSO_TELEMERE_RT_KIND_FILTER`
c. Classpath resource: `taoensso.telemere.rt-kind-filter`
Values are edn, examples:
Config values are parsed as edn, examples:
`taoensso.telemere.rt-min-level` -> ":info"
`TAOENSSO_TELEMERE_RT_NS_FILTER` -> "{:disallow \"taoensso.*\"}"
`taoensso.telemere.rt-id-filter.cljs` -> "#{:my-id1 :my-id2}"
`TAOENSSO_TELEMERE_RT_KIND_FILTER_CLJ` -> "nil"
`taoensso.telemere.rt-min-level` => ":info"
`TAOENSSO_TELEMERE_RT_NS_FILTER` => "{:disallow \"taoensso.*\"}"
`taoensso.telemere.rt-id-filter.cljs` => "#{:my-id1 :my-id2}"
`TAOENSSO_TELEMERE_RT_KIND_FILTER_CLJ` => "nil"
For other (non-filter) environmental config, see the relevant docstrings.
Runtime vs compile-time filters
The above filters (1..4) all apply at RUNTIME ("rt").
This is typically what you want, since it allows you to freely adjust filtering
(making it less OR MORE permissive) through later API calls like `set-min-level!`.
As an advanced option, you can instead/additionally ELIDE (entirely omit) filtered
callsites at COMPILE-TIME ("ct") by replacing "rt"->"ct" / "RT"->"CT" in the config
ids above. Compile-time filters CANNOT be made MORE permissive at runtime.
Tips:
- The above ids are for runtime filters (the most common).
For compile-time filters, change `rt`->`ct` / `RT`->`CT`.
- The above ids will affect both Clj AND Cljs.
- The above config ids will affect both Clj AND Cljs.
For platform-specific filters, use
".clj" / "_CLJ" or
".cljs" / "_CLJS" suffixes instead.
e.g. "taoensso.telemere.rt-min-level.cljs".
- To get the right edn syntax, first set your runtime filters using the
standard utils (`set-min-level!`, etc.). Then call `get-filters` and

View file

@ -45,7 +45,7 @@ Verify successful interop with [`check-interop`](https://cljdoc.org/d/com.taoens
To do this:
1. Ensure that you have the SLF4J [dependency](https://mvnrepository.com/artifact/org.slf4j/slf4j-api) ( v2+ **only**), and
1. Ensure that you have the SLF4J [dependency](https://mvnrepository.com/artifact/org.slf4j/slf4j-api) (v2+ **only**), and
2. Ensure that you have the Telemere SLF4J backend [dependency](https://clojars.org/com.taoensso/telemere-slf4j)
When `com.taoensso/telemere-slf4j` (2) is on your classpath AND no other SLF4J backends are, SLF4J will automatically direct all its logging calls to Telemere.

View file

@ -27,6 +27,7 @@ See ❤️ links below to **vote on future handlers**:
| Console (raw) | - | [](https://cljdoc.org/d/com.taoensso/telemere/CURRENT/api/taoensso.telemere#handler:console-raw) |
| [Datadog](https://www.datadoghq.com/) | [❤️](https://github.com/taoensso/roadmap/issues/12) | [❤️](https://github.com/taoensso/roadmap/issues/12) |
| Email | [](https://cljdoc.org/d/com.taoensso/telemere/CURRENT/api/taoensso.telemere.postal#handler:postal) | - |
| File/s | [](https://cljdoc.org/d/com.taoensso/telemere/CURRENT/api/taoensso.telemere#handler:file) | - |
| [Graylog](https://graylog.org/) | [❤️](https://github.com/taoensso/roadmap/issues/12) | - |
| [Jaeger](https://www.jaegertracing.io/) | [❤️](https://github.com/taoensso/roadmap/issues/12) | - |
| [Logstash](https://www.elastic.co/logstash) | [❤️](https://github.com/taoensso/roadmap/issues/12) | - |