Skip to content

Commit

Permalink
[mod] [BREAKING] [#322 #353] Reorganise community appenders
Browse files Browse the repository at this point in the history
Before this commit:
  Community appender namespaces: `taoensso.timbre.appenders.3rd-party.X`

After this commit:
  Community appender namespaces: `taoensso.timbre.appenders.community.X`.

This is a BREAKING change for you iff:
  You're using any of the included community appenders.
  In this case, just change `3rd-party` in your ns imports to `community`.

Motivation for change:

  The `3rd-party` namespace segment beginning with a numeric has long
  caused minor issues with tooling, etc. (e.g. #322).

  Took the opportunity to also exclude community code from the default
  Lein profiles to help prevent community code with strange dependencies
  and/or environment expectations (e.g. Android platform) from interfering
  with builds, cljdoc, etc.
  • Loading branch information
ptaoussanis committed Oct 23, 2022
1 parent e5851f7 commit 1c9fbb4
Show file tree
Hide file tree
Showing 21 changed files with 32 additions and 29 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Happy hacking!
* [Logs as Clojure values][] (v3+).
* Small, simple, cross-platform codebase.

## 3rd-party tools, appenders, etc.
## Community tools, appenders, etc.

Link | Description
------------------------ | -----------------------------------------------------
Expand Down Expand Up @@ -211,7 +211,7 @@ See also `car-appender/query-entries`.

#### Other included appenders

A number of 3rd-party appenders are included out-the-box [here](https://github.com/ptaoussanis/timbre/tree/master/src/taoensso/timbre/appenders/3rd_party). **Please see the relevant docstring for details**. Thanks goes to the respective authors!
A number of community appenders are included out-the-box [here](https://github.com/ptaoussanis/timbre/tree/master/src/taoensso/timbre/appenders/community). **Please see the relevant docstring for details**. Thanks goes to the respective authors!

Just give me a shout if you've got an appender you'd like to have added.

Expand All @@ -230,7 +230,7 @@ Otherwise, you can reach me at [Taoensso.com]. Happy hacking!
## License

Distributed under the [EPL v1.0] \(same as Clojure).
Copyright © 2015-2020 [Peter Taoussanis].
Copyright © 2015-2022 [Peter Taoussanis].

<!--- Standard links -->
[Taoensso.com]: https://www.taoensso.com
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns taoensso.timbre.appenders.3rd-party.android-logcat
(ns taoensso.timbre.appenders.community.android-logcat
"Android LogCat appender. Requires Android runtime."
{:author "Adam Clements (@AdamClements)"}
(:require
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns taoensso.timbre.appenders.3rd-party.congomongo
(ns taoensso.timbre.appenders.community.congomongo
"MongoDB appender. Requires https://github.com/aboekhoff/congomongo."
{:author "Emlyn Corrin (@emlyn)"}
(:require [somnium.congomongo :as mongo]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns taoensso.timbre.appenders.3rd-party.franzy
(ns taoensso.timbre.appenders.community.franzy
"Franzy (Kafka) appender.
Requires Franzy (https://github.com/ymilky/franzy."
{:author "Isaac Zeng (@gfZeng)"}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns taoensso.timbre.appenders.3rd-party.gelf
(ns taoensso.timbre.appenders.community.gelf
"Appender that sends GELF messages to a centralized logging server
(e.g. Graylog). Requires https://github.com/Graylog2/gelfclient."
{:author "Dave Owens (@davewo)"}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns taoensso.timbre.appenders.3rd-party.irclj
(ns taoensso.timbre.appenders.community.irclj
"IRC appender. Requires https://github.com/flatland/irclj."
{:author "Emlyn Corrin (@emlyn)"}
(:require
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns taoensso.timbre.appenders.3rd-party.logstash
(ns taoensso.timbre.appenders.community.logstash
"Appender that sends output to Logstash.
Requires Cheshire (https://github.com/dakrone/cheshire)."
{:author "Mike Sperber (@mikesperber), David Frese (@dfrese)"}
Expand All @@ -7,7 +7,7 @@
(:import [java.net Socket InetAddress]
[java.io PrintWriter]))

;; Adapted from taoensso.timbre.appenders.3rd-party.server-socket
;; Adapted from taoensso.timbre.appenders.community.server-socket

(defn connect
[host port]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns taoensso.timbre.appenders.3rd-party.newrelic
(ns taoensso.timbre.appenders.community.newrelic
"New Relic appender. Requires an appropriate New Relic jar,
Ref. https://goo.gl/3Nv0QX."
{:author "Camilo Polymeris (@polymeris)"}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns taoensso.timbre.appenders.3rd-party.postgresql
(ns taoensso.timbre.appenders.community.postgresql
"JDBC PostgreSQL database appender.
Requires https://github.com/clojure/java.jdbc,
https://github.com/swaldman/c3p0."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns taoensso.timbre.appenders.3rd-party.rolling
(ns taoensso.timbre.appenders.community.rolling
"Rolling file appender."
{:author "Unknown - please let me know?"}
(:require
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns taoensso.timbre.appenders.3rd-party.rotor
(ns taoensso.timbre.appenders.community.rotor
"Rotating file appender."
{:author "Karsten Schmidt (@postspectacular)"}
(:require
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns taoensso.timbre.appenders.3rd-party.sentry
(ns taoensso.timbre.appenders.community.sentry
"Sentry appender. Requires https://github.com/sethtrain/raven-clj."
{:author "Samuel Otter (@samuelotter)"}
(:require
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns taoensso.timbre.appenders.3rd-party.server-socket
(ns taoensso.timbre.appenders.community.server-socket
"TCP socket appender.
Requires https://github.com/technomancy/server-socket."
{:author "Emlyn Corrin (@emlyn)"}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns taoensso.timbre.appenders.3rd-party.slack
(ns taoensso.timbre.appenders.community.slack
"Slack appender. Requires https://github.com/julienXX/clj-slack."
{:author "Simon Belak (@sbelak)"}
(:require
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns taoensso.timbre.appenders.3rd-party.syslog-appender
(ns taoensso.timbre.appenders.community.syslog-appender
"Requires https://github.com/java-native-access/jna"
{:author "Audrius Molis @audriu"
:inspired-by "https://github.com/joshrotenberg/brolog"}
Expand Down Expand Up @@ -90,7 +90,7 @@
(timbre/merge-config!
{:appenders
{:syslog-appender
(taoensso.timbre.appenders.3rd-party.syslog-appender/syslog-appender
(taoensso.timbre.appenders.community.syslog-appender/syslog-appender
{:ident "my-app"
:syslog-options (byte 0x03)
:facility :log-user})}}))
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns taoensso.timbre.appenders.3rd-party.udp-socket
(ns taoensso.timbre.appenders.community.udp-socket
{:author "Leo Zovic (@inaimathi)"}
(:import [java.net DatagramSocket DatagramPacket InetSocketAddress]))

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns taoensso.timbre.appenders.3rd-party.zmq
(ns taoensso.timbre.appenders.community.zmq
"ØMQ appender. Requires https://github.com/zeromq/cljzmq."
{:author "Angus Fletcher (@angusiguess)"}
(:require
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(ns taoensso.timbre.appenders.3rd-party.rolling-test
(ns taoensso.timbre.appenders.community.rolling-test
(:require
[clojure.test :refer [deftest is use-fixtures]]
[taoensso.timbre.appenders.3rd-party.rolling :as rolling])
[taoensso.timbre.appenders.community.rolling :as rolling])
(:import
(java.io File)
(java.nio.file Files)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
(ns taoensso.timbre.appenders.3rd-party.rotor-test
(ns taoensso.timbre.appenders.community.rotor-test
(:require
[clojure.test :refer :all]
[clojure.java.io :as io]
[clojure.set :as set]
[taoensso.timbre :as timbre]
[taoensso.timbre.appenders.3rd-party.rotor :as rotor]))
[taoensso.timbre.appenders.community.rotor :as rotor]))

(def logfile "rotor-test.log")

Expand Down
11 changes: 7 additions & 4 deletions project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@
:1.10 {:dependencies [[org.clojure/clojure "1.10.3"]]}
:1.11 {:dependencies [[org.clojure/clojure "1.11.1"]]}
:depr {:jvm-opts ["-Dtaoensso.elide-deprecated=true"]}
:dev [:1.11 :test :server-jvm #_:depr :3pa] ; TODO :depr
:dev [:1.11 :test :server-jvm #_:depr #_:community] ; TODO :depr

:3pa ; 3rd-party appenders
{:dependencies
:community
{:source-paths [ "src" "community/src"]
:test-paths ["test" "src" "community/test" "community/src"]
:dependencies
[[irclj "0.5.0-alpha4"]
[org.graylog2/gelfclient "1.5.1"
:exclusions [com.fasterxml.jackson.core/jackson-core]]
Expand Down Expand Up @@ -76,7 +78,8 @@

:aliases
{"build-once" ["cljsbuild" "once"]
"deploy-lib" ["do" "build-once," "deploy" "clojars," "install"]
"deploy-lib" ["with-profile" "+community"
"do" "build-once," "deploy" "clojars," "install"]
"start-dev" ["with-profile" "+dev" "repl" ":headless"]
"test-all" ["do" "clean,"
"with-profile" "+1.11:+1.10:+1.9:+1.8:+1.7" "test,"
Expand Down

0 comments on commit 1c9fbb4

Please sign in to comment.