mirror of https://github.com/status-im/timbre.git
Improve README
This commit is contained in:
parent
e7bf5015e9
commit
9741aaa92d
13
README.md
13
README.md
|
@ -156,13 +156,20 @@ Filter logging output by namespaces:
|
||||||
|
|
||||||
#### Socket ([server-socket](https://github.com/technomancy/server-socket)) appender
|
#### Socket ([server-socket](https://github.com/technomancy/server-socket)) appender
|
||||||
|
|
||||||
|
Listens on the specified interface (use :all for all interfaces, defaults to localhost if unspecified) and port. Connect with either of:
|
||||||
|
|
||||||
|
```
|
||||||
|
telnet localhost 9000
|
||||||
|
netcat localhost 9000
|
||||||
|
```
|
||||||
|
|
||||||
```clojure
|
```clojure
|
||||||
;; [server-socket "1.0.0"] ; Add to project.clj dependencies
|
;; [server-socket "1.0.0"] ; Add to project.clj dependencies
|
||||||
;; (:require [taoensso.timbre.appenders (socket :as socket-appender)]) ; Add to ns
|
;; (:require [taoensso.timbre.appenders (socket :as socket-appender)]) ; Add to ns
|
||||||
|
|
||||||
(timbre/set-config! [:appenders :socket] socket-appender/socket-appender)
|
(timbre/set-config! [:appenders :socket] socket-appender/socket-appender)
|
||||||
(timbre/set-config! [:shared-appender-config :socket]
|
(timbre/set-config! [:shared-appender-config :socket]
|
||||||
{:list-addr "127.0.0.1"
|
{:listen-addr :all
|
||||||
:port 9000})
|
:port 9000})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -191,7 +198,7 @@ See the `timbre/config` docstring for more information on appenders.
|
||||||
|
|
||||||
The usual recommendation for Clojure profiling is: use a good **JVM profiler** like [YourKit](http://www.yourkit.com/), [JProfiler](http://www.ej-technologies.com/products/jprofiler/overview.html), or [VisualVM](http://docs.oracle.com/javase/6/docs/technotes/guides/visualvm/index.html).
|
The usual recommendation for Clojure profiling is: use a good **JVM profiler** like [YourKit](http://www.yourkit.com/), [JProfiler](http://www.ej-technologies.com/products/jprofiler/overview.html), or [VisualVM](http://docs.oracle.com/javase/6/docs/technotes/guides/visualvm/index.html).
|
||||||
|
|
||||||
And these certainly do the job. But as with many Java tools, they can be a little hairy and often heavy-handed - especially when applied to Clojure. Timbre includes an alternative.
|
And these certainly do the job. But as with many Java tools, they can be a little hairy and often heavy-handed - especially when applied to Clojure. Timbre includes an alternative.
|
||||||
|
|
||||||
Let's add it to our app's `ns` declaration:
|
Let's add it to our app's `ns` declaration:
|
||||||
|
|
||||||
|
@ -258,4 +265,4 @@ Otherwise reach me (Peter Taoussanis) at [taoensso.com](https://www.taoensso.com
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
Copyright © 2012, 2013 Peter Taoussanis. Distributed under the [Eclipse Public License](http://www.eclipse.org/legal/epl-v10.html), the same as Clojure.
|
Copyright © 2012, 2013 Peter Taoussanis. Distributed under the [Eclipse Public License](http://www.eclipse.org/legal/epl-v10.html), the same as Clojure.
|
||||||
|
|
Loading…
Reference in New Issue