mirror of
https://github.com/taoensso/telemere.git
synced 2025-12-16 17:41:12 +00:00
[mod] Move dep: com.taoensso/slf4j-telemere -> com.taoensso/telemere-slf4j
This commit is contained in:
parent
ece51b2ef6
commit
77ed27cfd1
6 changed files with 9 additions and 9 deletions
|
|
@ -50,7 +50,7 @@
|
|||
[org.clojure/tools.logging "1.3.0"]
|
||||
[org.slf4j/slf4j-api "2.0.16"]
|
||||
[com.taoensso/telemere-api "1.0.0-SNAPSHOT"]
|
||||
[com.taoensso/slf4j-telemere "1.0.0-SNAPSHOT"]
|
||||
[com.taoensso/telemere-slf4j "1.0.0-SNAPSHOT"]
|
||||
#_[org.slf4j/slf4j-simple "2.0.16"]
|
||||
#_[org.slf4j/slf4j-nop "2.0.16"]
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
(do
|
||||
(def present:tools-logging? (enc/have-resource? "clojure/tools/logging.clj"))
|
||||
(def present:slf4j? (enc/compile-if org.slf4j.Logger true false))
|
||||
(def present:slf4j-telemere? (enc/compile-if com.taoensso.telemere.slf4j.TelemereLogger true false))
|
||||
(def present:telemere-slf4j? (enc/compile-if com.taoensso.telemere.slf4j.TelemereLogger true false))
|
||||
(def present:otel? (enc/compile-if io.opentelemetry.context.Context true false))
|
||||
|
||||
(def enabled:tools-logging?
|
||||
|
|
@ -779,7 +779,7 @@
|
|||
"{<source-id> (fn check [])}"
|
||||
(atom
|
||||
{:tools-logging (fn [] {:present? present:tools-logging?, :enabled-by-env? enabled:tools-logging?})
|
||||
:slf4j (fn [] {:present? present:slf4j?, :telemere-provider-present? present:slf4j-telemere?})
|
||||
:slf4j (fn [] {:present? present:slf4j?, :telemere-provider-present? present:telemere-slf4j?})
|
||||
:open-telemetry (fn [] {:present? present:otel?, :use-tracer? enabled:otel-tracing?})}))
|
||||
|
||||
(defn add-interop-check! [source-id check-fn] (swap! interop-checks_ assoc source-id check-fn))
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
(defproject com.taoensso/slf4j-telemere "1.0.0-SNAPSHOT"
|
||||
(defproject com.taoensso/telemere-slf4j "1.0.0-SNAPSHOT"
|
||||
:author "Peter Taoussanis <https://www.taoensso.com>"
|
||||
:description "Telemere backend/provider for SLF4J API v2"
|
||||
:url "https://www.taoensso.com/telemere"
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Telemere will attempt to load this ns automatically when possible.
|
||||
|
||||
To use Telemere as your SLF4J backend/provider, just include the
|
||||
`com.taoensso/slf4j-telemere` dependency on your classpath.
|
||||
`com.taoensso/telemere-slf4j` dependency on your classpath.
|
||||
|
||||
Implementation details,
|
||||
Ref. <https://www.slf4j.org/faq.html#slf4j_compatible>:
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
- Libs must include `org.slf4j/slf4j-api` dependency, but NO backend.
|
||||
|
||||
- Users must include a single backend dependency of their choice
|
||||
(e.g. `com.taoensso/slf4j-telemere` or `org.slf4j/slf4j-simple`).
|
||||
(e.g. `com.taoensso/telemere-slf4j` or `org.slf4j/slf4j-simple`).
|
||||
|
||||
- SLF4J uses standard `ServiceLoader` mechanism to find its logging backend,
|
||||
searches for `SLF4JServiceProvider` provider on classpath."
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ See section [3-Config](./3-Config) for customization.
|
|||
|
||||
| Platform | Condition | Signals from |
|
||||
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------- |
|
||||
| Clj | [SLF4J API](https://mvnrepository.com/artifact/org.slf4j/slf4j-api) and [Telemere SLF4J backend](https://clojars.org/com.taoensso/slf4j-telemere) present | [SLF4J](https://www.slf4j.org/) logging calls |
|
||||
| Clj | [SLF4J API](https://mvnrepository.com/artifact/org.slf4j/slf4j-api) and [Telemere SLF4J backend](https://clojars.org/com.taoensso/telemere-slf4j) present | [SLF4J](https://www.slf4j.org/) logging calls |
|
||||
| Clj | [tools.logging](https://mvnrepository.com/artifact/org.clojure/tools.logging) present and [`tools-logging->telemere!`](https://cljdoc.org/d/com.taoensso/telemere/CURRENT/api/taoensso.telemere.tools-logging#tools-logging-%3Etelemere!) called | [tools.logging](https://github.com/clojure/tools.logging) logging calls |
|
||||
| Clj | [`streams->telemere!`](https://cljdoc.org/d/com.taoensso/telemere/CURRENT/api/taoensso.telemere#streams-%3Etelemere!) called | Output to `System/out` and `System/err` streams |
|
||||
|
||||
|
|
|
|||
|
|
@ -47,12 +47,12 @@ To do this, ensure that you have the following dependencies:
|
|||
|
||||
```clojure
|
||||
[org.slf4j/slf4j-api "x.y.z"] ; >= 2.0.0 only!
|
||||
[com.taoensso/slf4j-telemere "x.y.z"]
|
||||
[com.taoensso/telemere-slf4j "x.y.z"]
|
||||
```
|
||||
|
||||
> Telemere needs SLF4J API **version 2 or newer**. If you're seeing `Failed to load class "org.slf4j.impl.StaticLoggerBinder"` it could be that your project is importing the older v1 API, check with `lein deps :tree` or equivalent.
|
||||
|
||||
When `com.taoensso/slf4j-telemere` is on your classpath AND no other SLF4J backends are, SLF4J will direct all its logging calls to Telemere.
|
||||
When `com.taoensso/telemere-slf4j` is on your classpath AND no other SLF4J backends are, SLF4J will direct all its logging calls to Telemere.
|
||||
|
||||
Verify successful interop with [`check-interop`](https://cljdoc.org/d/com.taoensso/telemere/CURRENT/api/taoensso.telemere#check-interop):
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue