Commit Graph

316 Commits

Author SHA1 Message Date
Pedro Pombeiro 61943fb33d
Make calls to logging functions create deterministic code 2019-06-07 09:20:22 +02:00
Peter Taoussanis 1c007f2e16 [#215] PR housekeeping 2017-04-15 13:10:04 +02:00
Samuel Otter 1a434293a3 [#215] Add 3rd-party appender for Sentry (@samuelotter)
Appender that sends events to Sentry (https://sentry.io/).
2017-04-15 13:10:04 +02:00
Peter Taoussanis 05cd4a771b [#216] PR housekeeping 2017-04-15 13:10:04 +02:00
Michael Cameron eb78de58c8 [#216] Cljs console appender: don't log superfluous 'null' for raw output (@michaelcameron) 2017-04-15 13:10:03 +02:00
Peter Taoussanis 44ce7e8613 [#218] Fix nullary version of `timbre.tools.logging/use-timbre` 2017-04-15 13:10:03 +02:00
Peter Taoussanis b5c998b46b [#199] More reliable fix for unintended warning output to cljs 2017-02-19 03:00:04 +01:00
Peter Taoussanis 6526637160 v4.8.0 2016-12-18 12:53:33 +01:00
Peter Taoussanis f4266ab60e Allow nil args to `log!` (just print without message) 2016-12-18 12:50:30 +01:00
Peter Taoussanis a38dceff3b Default output fn: try use ?file when ?ns-str unavailable 2016-12-18 12:50:30 +01:00
Peter Taoussanis 4eb8433f8e Improve error message for logging calls with missing format pattern 2016-12-18 12:50:30 +01:00
Peter Taoussanis 4874458007 DEPRECATED: per-appender :middleware-fn
Why?
  Not actually much use to this in practice. In particular,
  the current implementation didn't support influence over
  :msg_ and :output_ vals through the modification of :vargs.

  Support could be added, but the impl. would need to be
  reasonably involved. The feature's utility just doesn't justify
  the cost necessary to do it right.

--

Note: per-appender :ns-whitelist, :ns-blacklist are unchanged.
2016-12-18 12:50:30 +01:00
Peter Taoussanis b1246da6e4 ns-form housekeeping 2016-12-18 12:50:30 +01:00
Peter Taoussanis 9b9dd210cc [#207] BREAKING: simplify impl., middleware no longer receive :msg_ or :hash_
These weren't used often (ever?) in middleware, and the removal allows
for a simpler+faster implementation here.
2016-12-18 12:50:30 +01:00
Peter Taoussanis e4f33c5341 [#207] Fix: middleware couldn't influence automatic msg_ generation
As of this commit:
The values of :msg_ and :output_ will depend on the actual value of
:vargs *at the time of first evaluation*.
2016-12-18 12:50:30 +01:00
Peter Taoussanis d6181ef1b0 [#199] Attempted fix for unintended elision warning output to cljs
This *should* do the trick, but still need to confirm. Certainly
won't hurt.
2016-12-18 12:50:30 +01:00
Peter Taoussanis 594e518c8e [#207] Add docstring for `with-context` 2016-12-18 12:50:30 +01:00
Peter Taoussanis d8d667aea4 [#206] Resolve `slf4j-timbre` issue with `may-log?` and namespace filtering 2016-12-18 12:50:30 +01:00
Peter Taoussanis 0ced7021aa [#202] 9e85cb4 PR housekeeping 2016-12-18 12:50:29 +01:00
Matt Grimm 521846c930 [#202] Add :append param to spit-appender to allow clobber behavior (@tkocmathla) 2016-12-18 12:50:29 +01:00
Peter Taoussanis 5d3a9c8f1b [#198] PR housekeeping 2016-12-18 12:50:29 +01:00
Peter Taoussanis ea2267e593 [#198] Adjust filename 2016-10-21 13:17:38 +07:00
Isaac Zeng b970bd8ebc [#198] Add 3rd-party kafka appender (@gfZeng) 2016-10-21 13:09:01 +07:00
Tyler van Hensbergen e9c5dc0479 [#195] Logstash appender: add `:flush?` option (@tvanhens)
Setting the value to true will eagerly flush the tcp writer. Default
behavior is for this to be false.
2016-09-16 10:38:36 +07:00
Daniel Compton ef8592f27d [#191] Add clj only note to :timestamp-opts in README (@danielcompton) 2016-08-31 10:37:54 +07:00
Dan Sapala 242b262f0d [#192] Rolling appender: create dirs when they don't exist (@dsapala) 2016-08-31 10:34:51 +07:00
Peter Taoussanis 587b3e015f [#188] Hotfix: regression re: interleaving println 2016-08-23 09:46:50 +07:00
Peter Taoussanis 97df46c6b3 v4.7.3 (syncing deps) 2016-07-24 18:04:00 +07:00
Peter Taoussanis 2822efe513 Cljs console appender: allow late .-log binding 2016-07-23 11:56:35 +07:00
Peter Taoussanis bf619cbe6e [#183] Add support for appender-level middleware
Motivating use case: let users apply custom ns-filtering or other
conditional logic at an appender level *without* needing to actually
modify the appender fn.

This is just a natural generalization of the recently added support
for appender-level ns filters, etc.
2016-07-19 11:39:05 +07:00
Peter Taoussanis 7894ea3d19 Revert "[#181] Temp demonstration for @nvseenu"
This reverts commit d99fd909a3.
2016-07-12 21:12:11 +07:00
Peter Taoussanis d99fd909a3 [#181] Temp demonstration for @nvseenu 2016-07-12 21:10:46 +07:00
Peter Taoussanis 4f795eda60 Deprecate profiling ns, point to Tufte 2016-07-11 16:31:26 +07:00
Peter Taoussanis 01bbf48d6f Revert profiling to Timbre v4.4.0 state
Specifically:
  - Reverting some experimental new features (`profiled`), etc.
  - Restoring old multi-threaded (dynamic) profiling support

The new thread-local performance improvements have instead been
moved to Tufte: https://github.com/ptaoussanis/tufte
2016-07-11 16:31:26 +07:00
Peter Taoussanis d6f10795a6 Refactor elision utils 2016-07-11 16:31:26 +07:00
Peter Taoussanis 728dec01c7 Appender docs housekeeping 2016-07-07 16:58:28 +07:00
Peter Taoussanis f2f42ca39f [#179] Break hostname util into smaller components 2016-07-07 16:58:28 +07:00
Peter Taoussanis 6d3fc57dbb [#176] PR housekeeping 2016-07-05 10:35:11 +07:00
Camilo Polymeris 9cf8dec29c [#176] Add New Relic appender (@polymeris) 2016-07-05 10:35:11 +07:00
Peter Taoussanis 7ee42f71e7 [#177] PR housekeeping 2016-07-05 09:52:30 +07:00
Josh Tilles f9563cc10d [#177] Improvements to clojure.tools.logging integration (@MerelyAPseudonym) 2016-07-04 13:41:25 +07:00
Peter Taoussanis f399d250cb [#174] Smarter (faster) spit appender path creation 2016-07-01 16:44:31 +07:00
Peter Taoussanis 64dc0f52aa Assist with https://github.com/fzakaria/slf4j-timbre/issues/20
Users have reported seeing `Wrong number of args (9) passed to: timbre/-log!`
errors via slf4j-timbre when upgrading from Timbre v4.4.0 -> v4.5.0.

slf4j-timbre already uses the correct public API (timbre/log!), so this looks
like an AOT issue: a compiled Timbre v4.4.0 `log!` macro expansion is calling
a `v4.5.0` `-log!` function and breaking.

Unfortunately, looks[1] like a user-level call to `lein clean` isn't enough to
resolve the issue. Might be that slf4j-timbre itself needs to be recompiled?

Whatever the underlying cause, this should be a reasonable workaround for now.

[1] : https://github.com/fzakaria/slf4j-timbre/issues/20#issuecomment-229254285
2016-06-29 12:00:52 +07:00
Peter Taoussanis 0a765cb9ca Fix missing SimpleDateFormat type hint 2016-06-29 11:55:16 +07:00
Peter Taoussanis 49830fe798 Profiling: add experimental low-level `profiled` util 2016-06-23 18:45:49 +07:00
Peter Taoussanis 7b9d9b31c8 Profiling: final performance work (nb: don't squash)
Choosing not to squash into previous commit since we're introducing
a bunch of JVM-specific code here. If we do later decide to do a
.cljx port, will be handy to have the previous code around as a
platform agnostic option.
2016-06-23 18:42:08 +07:00
Peter Taoussanis d7b22c53c4 Profiling: NB refactor ns (incl. *signf.* perf bumps) 2016-06-23 18:41:58 +07:00
Peter Taoussanis fa1740e7fb Update 3rd-party appenders 2016-06-23 18:41:45 +07:00
Peter Taoussanis 682fa62334 Update core appenders
Note Carmine appender output change for `query-entries` util.
2016-06-23 18:41:45 +07:00
Peter Taoussanis e5b95cbd75 NB Refactor appenders API, implementation
Appender arg changes:
  - REMOVED: :data-output-fn, :hash-arg_
  - Deprecated: :?err_, :vargs_ (no point in delaying these now)
  - New: :?err, :vargs, :?msg-fmt, :hash_, :output_, :?meta

Implementation notes:
  - Have unified all vargs processing during margs phase
  - vargs no longer contains message format; now extracted as separate :?msg-fmt
  - :output-fn and :timezone_ are now cached between appenders when possible
  - :output_ now provides a convenient, cache-aware way of getting formatted ouput
  - Hash stuff is now non-configurable but far more predictable; if appenders
    have specific needs beyond :hash_, they should use a custom (fn [data]).
2016-06-23 18:40:00 +07:00