Skip to content

Commit 97e30f5

Browse files
committed
[doc] Update docs
1 parent 6b4873e commit 97e30f5

File tree

3 files changed

+45
-8
lines changed

3 files changed

+45
-8
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,15 @@ Getting even the simplest Java logging working can be maddeningly complex, and i
99

1010
Timbre offers an **all Clojure/Script** alternative that's fast, deeply flexible, easy to configure with pure Clojure data, and that **just works out the box**.
1111

12-
Supports optional interop with [tools.logging](https://github.com/taoensso/timbre/blob/master/src/taoensso/timbre/tools/logging.clj) and [log4j/logback/slf4j](https://github.com/fzakaria/slf4j-timbre).
12+
Supports optional interop with [tools.logging](../../wiki/4-Interop#toolslogging) and [Java logging via SLF4Jv2](../../wiki/4-Interop#java-logging).
13+
14+
## Library status
15+
16+
While I will continue to support Timbre as always, I'd recommend new users see [Telemere](https://www.taoensso.com/telemere) instead - which is essentially a **modern rewrite of Timbre**.
17+
18+
There's **zero pressure** for existing users of Timbre to migrate, though there are significant benefits - and migration is often [quick and easy](https://github.com/taoensso/telemere/wiki/5-Migrating#from-timbre). See [here](https://github.com/taoensso/telemere/wiki/6-FAQ#why-not-just-update-timbre) for why I made the decision to release a new library.
19+
20+
\- Peter Taoussanis
1321

1422
## Latest release/s
1523

wiki/3-Community.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ GitHub PRs very welcome for:
1414

1515
If you spot issues with any linked resources, please **contact the relevant authors** to let them know!
1616

17-
Contributor | Link | Description
18-
:-- | :-- | :--
19-
[@fzakaria](https://github.com/fzakaria) | [slf4j-timbre](https://github.com/fzakaria/slf4j-timbre) | Route log4j/logback/sfl4j log output to Timbre
20-
[@palletops](https://github.com/palletops) | [log-config](https://github.com/palletops/log-config) | Library to help manage Timbre logging config
21-
[@djblue](https://github.com/djblue) | [portal](https://github.com/djblue/portal/tree/master/examples/timbre) | Guide to using Timbre with [Portal](https://github.com/djblue/portal)
22-
[@viesti](https://github.com/viesti) | [timbre-json-appender](https://github.com/viesti/timbre-json-appender/) | JSON appender for Timbre
23-
_ | _ | Your link here? [PRs](../wiki#contributions-welcome) welcome!
17+
| Contributor | Link | Description |
18+
| :----------------------------------------- | :---------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------- |
19+
| [@fzakaria](https://github.com/fzakaria) | [slf4j-timbre](https://github.com/fzakaria/slf4j-timbre) | Route log4j/logback/sfl4j log output to Timbre (**UPDATE**: Timbre now includes [built-in SLF4J support](./4-Interop#java-logging)) |
20+
| [@palletops](https://github.com/palletops) | [log-config](https://github.com/palletops/log-config) | Library to help manage Timbre logging config |
21+
| [@djblue](https://github.com/djblue) | [portal](https://github.com/djblue/portal/tree/master/examples/timbre) | Guide to using Timbre with [Portal](https://github.com/djblue/portal) |
22+
| [@viesti](https://github.com/viesti) | [timbre-json-appender](https://github.com/viesti/timbre-json-appender/) | JSON appender for Timbre |
23+
| _ | _ | Your link here? [PRs](../wiki#contributions-welcome) welcome! |

wiki/4-Interop.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# tools.logging
2+
3+
[tools.logging](https://github.com/clojure/tools.logging) can use Timbre as its logging implementation (backend). This'll let tools.logging calls trigger Timbre logging calls.
4+
5+
To do this:
6+
7+
1. Ensure that you have the tools.logging [dependency](https://mvnrepository.com/artifact/org.clojure/tools.logging), and
8+
2. Require the `taoensso.timbre.tools.logging` namespace
9+
3. Call [`taoensso.timbre.tools.logging/use-timbre`](https://taoensso.github.io/timbre/taoensso.timbre.tools.logging.html#var-use-timbre)
10+
11+
# Java logging
12+
13+
[SLF4Jv2](https://www.slf4j.org/) can use Timbre as its logging backend. This'll let SLF4J logging calls trigger Timbre logging calls.
14+
15+
To do this:
16+
17+
1. Ensure that you have the SLF4J [dependency](https://mvnrepository.com/artifact/org.slf4j/slf4j-api) ( v2+ **only**), and
18+
2. Ensure that you have the Timbre SLF4J backend [dependency](https://clojars.org/com.taoensso/timbre-slf4j)
19+
20+
When `com.taoensso/timbre-slf4j` (2) is on your classpath AND no other SLF4J backends are, SLF4J will automatically direct all its logging calls to Timbre.
21+
22+
> Timbre 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.
23+
24+
For other (non-SLF4J) logging like [Log4j](https://logging.apache.org/log4j/2.x/), [java.util.logging](https://docs.oracle.com/javase/8/docs/api/java/util/logging/package-summary.html) (JUL), and [Apache Commons Logging](https://commons.apache.org/proper/commons-logging/) (JCL), use an appropriate [SLF4J bridge](https://www.slf4j.org/legacy.html) and the normal SLF4J config as above.
25+
26+
In this case logging will be forwarded:
27+
28+
1. From Log4j/JUL/JCL/etc. to SLF4J, and
29+
2. From SLF4J to Timbre

0 commit comments

Comments
 (0)