Peter Taoussanis
4cc5bf3b47
Make ns-filter check compile-time, add optional compile-time logging-level
2013-08-21 14:00:08 +07:00
Peter Taoussanis
bad95553c2
Mark `taoensso.timbre.frequencies` ns as deprecated
2013-08-20 22:42:19 +07:00
Peter Taoussanis
77beb18032
Refactor log macro implementations
2013-08-07 23:44:35 +07:00
Peter Taoussanis
fd03c042e9
Disable `:line` appender arg (broken)
2013-08-07 22:07:44 +07:00
Peter Taoussanis
718f38c462
Make `make-timestamp-fn` thread safe (thanks to jarppe for report)
2013-08-07 12:44:37 +07:00
Peter Taoussanis
382f9d4f9a
Add :file and :line appender args (thanks to jarppe for suggestion)
2013-08-07 12:18:46 +07:00
Peter Taoussanis
8789358c7d
Extend `refer-timbre` to `logf` macros
2013-07-30 20:50:36 +07:00
Peter Taoussanis
2d38d2a970
Add output pattern TODO
2013-07-23 21:38:05 +07:00
Peter Taoussanis
545c278394
Allow `fspy` to capture freq for exception-throwing bodies
2013-07-23 14:43:14 +07:00
Peter Taoussanis
ce4c9c34de
Use Throwable as Postal appender subject when no other args given
2013-07-22 22:41:15 +07:00
Peter Taoussanis
ddd9e18d8e
Clean up `spy` error logging, catch Throwables for `log-errors`, `log-and-rethrow-errors`
2013-07-22 22:41:15 +07:00
Peter Taoussanis
853807df4c
Housekeeping
2013-07-22 22:21:49 +07:00
Peter Taoussanis
758c370ac7
Deprecate `logp`, `s`
2013-07-22 22:21:07 +07:00
Peter Taoussanis
b510633f03
Add `refer-timbre`
2013-07-22 17:53:36 +07:00
Peter Taoussanis
07fdddf2f2
NB: Fix v2.3.2 regression
2013-07-21 17:32:18 +07:00
Peter Taoussanis
62ed4086ea
Wrap 95109b7
body expansion in `(do)` for hygiene
2013-07-20 22:23:34 +07:00
Peter Taoussanis
7961a8d807
Make `log` an alias for `logp`
2013-07-20 15:15:49 +07:00
Peter Taoussanis
95109b7451
Allow `pspy` to capture time for exception-throwing bodies (thanks Jacek Lach)
2013-07-20 00:39:44 +07:00
Peter Taoussanis
807cb40e0f
Housekeeping: profiling & freqs
2013-07-20 00:39:44 +07:00
Peter Taoussanis
ce9ea0ac76
Add `with-log-level` for thread-local logging levels
2013-07-10 13:45:31 +07:00
Peter Taoussanis
0945b83009
Housekeeping: rename `utils/deep-merge` -> `utils/merge-deep`
2013-07-06 00:54:25 +07:00
Peter Taoussanis
634223bdbc
Merge branch 'mongo' of github.com:emlyn/timbre into emlyn-mongo
2013-06-27 15:06:08 +07:00
Emlyn Corrin
b7ec7ae71b
Remove restriction on :throwable, default to all but :ap-config
2013-06-26 18:02:09 +01:00
Peter Taoussanis
25cc163c34
Tweak README
2013-06-22 17:43:56 +07:00
Peter Taoussanis
f3d704bc45
Merge pull request #18 from emlyn/socket
...
TCP Socket Appender (emlyn)
2013-06-14 20:37:42 -07:00
Peter Taoussanis
71218f7086
Allow no-message throwable logging, use `str` for ex-data printing
2013-06-07 20:45:33 +07:00
Peter Taoussanis
5d4e5f2739
Fix ex-data separator
2013-06-07 20:22:00 +07:00
Peter Taoussanis
eaa4495e49
Add `ex-data` output to `stacktrace` fn
2013-06-07 20:15:07 +07:00
Emlyn Corrin
7cfae88eb3
Add more default keys, allow setting write-concern
2013-06-05 18:19:18 +01:00
Emlyn Corrin
e7bf5015e9
Make threads daemons to not block shutdown, add stacktrace, default to localhost only but allow :all
2013-06-05 16:45:59 +01:00
Peter Taoussanis
912dfb46d0
Fix: `log*` return value should be `nil`, not `true`
2013-06-05 20:16:29 +07:00
Emlyn Corrin
6dac0ec03e
Add socket appender
2013-06-05 13:52:23 +01:00
Emlyn Corrin
fff4a85b5d
Add MongoDB appender
2013-06-05 13:06:11 +01:00
Peter Taoussanis
7b09d1a562
BREAKING: Refactor Timbre for integration with clojure.tools.logging & logf macros
...
BREAKING CHANGES:
* Custom appenders that rely on the :more argument will no longer function correctly.
* Stacktraces are no longer automatically generated at the `log`-macro level, but are
left as an appender implementation detail. A :throwable appender argument has been added
along with a `stacktrace` fn.
MIGRATION GUIDE:
* :message is now a string of all arguments as joined by `logp`/`logf`. Appenders that
need unjoined logging arguments (i.e. raw arguments as given to `logp`/`logf`) should
use the new :log-args vector.
MOTIVATION:
The :more argument was always kind of manky.
By joining logging arguments at the `log`-macro level, we simplify appender
implementations and allow the use of different joining strategies like `logp` and
`logf`.
This approach also fits better with the `tools.logging` API, allowing a cleaner
Logger implementation.
2013-06-01 19:29:57 +07:00
Peter Taoussanis
6fc6baee37
Rename appender argument: :max-message-per-msecs -> :limit-per-msecs (backwards compatible)
2013-06-01 19:29:57 +07:00
Peter Taoussanis
c30ae5fbcc
Housekeeping
2013-06-01 19:29:57 +07:00
Peter Taoussanis
7c29ce6852
Clean up appender documentation
2013-06-01 19:29:57 +07:00
Emlyn Corrin
0d1dfe6259
Remove extra newline for nicer diff
2013-04-20 08:55:05 +01:00
Emlyn Corrin
3302d17af6
Per-appender prefix-fns
2013-04-19 18:01:55 +01:00
Emlyn Corrin
48f8329dbb
Add IRC appender
2013-04-19 14:28:02 +01:00
Peter Taoussanis
0dc4951db7
Fix EvalReader exception when *read-eval* is false (thanks ummels)
2013-04-14 16:30:19 +07:00
Peter Taoussanis
7935493a22
Remove unnecessary `set-config!` destructuring
2013-03-17 14:40:32 +07:00
Peter Taoussanis
03d2c0c242
nil logging level should be < :trace logging level
2013-03-16 14:30:05 +07:00
Peter Taoussanis
5864673b47
Housekeeping
2013-03-16 14:30:05 +07:00
Peter Taoussanis
17043d20b7
Catch UnknownHostException
2013-02-11 11:47:24 +07:00
Peter Taoussanis
27388879a4
Fix: remove `mapv` use in frequencies.clj (requires Clojure 1.4+)
2013-02-08 14:21:22 +07:00
Peter Taoussanis
ff5ce760cf
Housekeeping
2013-02-07 20:27:17 +07:00
Peter Taoussanis
c7d59a570b
Add experimental logging frequency counter (`utils/frequencies.clj`)
2013-02-07 18:11:46 +07:00
Peter Taoussanis
3258023105
Refactor profiling ns
2013-02-07 18:09:41 +07:00
Peter Taoussanis
9454e0f4ab
Add `logged-future`
2013-02-06 00:37:12 +07:00
Peter Taoussanis
6c359427d9
Use ns as part of flood control message disambiguator
2013-02-05 23:35:14 +07:00
Peter Taoussanis
4184491719
Add middleware support, refactor appender decoration
...
* Appenders are now decorated via 2 separate mechanisms: a per-appender
decorator (as before), and a new per-juxt (i.e. combined) decorator.
The per-juxt wrapping provides a performance-conscious hook for
higher-level facilities like the new middleware feature.
* Moved compile-time config wrapping from per-appender to per-juxt,
improving performance.
* Fixed appender wrapper ordering.
2013-02-05 20:05:42 +07:00
Peter Taoussanis
210fe39b37
Add `spy` alias
2013-02-03 01:10:00 +07:00
Peter Taoussanis
bbbaf036b5
Fix: `spy` double-evaluation
2013-02-03 01:10:00 +07:00
Peter Taoussanis
a7b41a6f2d
Add `middleware` dev notes
2013-02-03 00:55:23 +07:00
Peter Taoussanis
3c211afe62
Housekeeping
2013-01-29 16:57:28 +07:00
Peter Taoussanis
75778694ff
Add `with-default-outs`, `with-err-as-out`, `log-errors`, `log-and-rethrow-errors`
2013-01-29 16:49:42 +07:00
Peter Taoussanis
b1d60d1bee
Swap `utils/round-to` arg order
2013-01-24 21:58:28 +07:00
Peter Taoussanis
222be9d48e
Add `merge-config!`
2013-01-04 14:50:28 +07:00
Peter Taoussanis
f23b59119d
Update `utils/deep-merge-with`
2013-01-04 14:42:29 +07:00
Peter Taoussanis
d8b35e14cc
Label stacktraces in output
2013-01-03 23:37:18 +07:00
Peter Taoussanis
d13b870799
Add string color utils
2013-01-03 23:37:18 +07:00
Peter Taoussanis
7c81fc58de
Fix `config` docstring
2012-12-28 14:12:53 +07:00
Peter Taoussanis
b6b447ca9a
Print seconds to 1 decimal place
2012-12-16 19:22:10 +07:00
Peter Taoussanis
b07c044004
Distinguish between wall-clock and accounted times
2012-12-16 19:03:11 +07:00
Peter Taoussanis
d6bc6b2947
Rename 'total'->'time'
2012-12-16 18:45:01 +07:00
Peter Taoussanis
fc51884472
Refactor valid logging-level checks, support non-const logging levels
...
The `assert-valid-logging-level` macro had the unfortunate side effect of
preventing the use of runtime-evaluated logging-levels.
To get around this without impacting performance, `assert-valid-logging-level`
has been removed and the validty checking moved to the (memoized) level
comparator.
This is cleaner, more flexible, and no slower.
2012-10-26 16:24:42 +07:00
Peter Taoussanis
92e31c7b7c
Add simple file spit appender
2012-10-19 15:26:54 +07:00
Peter Taoussanis
dc995c10ad
Add `utils/deep-merge`
2012-10-19 15:05:24 +07:00
Peter Taoussanis
5750fc7c8b
Fix `ap-config` bug
2012-10-19 15:04:42 +07:00
Peter Taoussanis
ad2dad1156
Housekeeping
2012-10-19 15:02:35 +07:00
Peter Taoussanis
c05b7ca392
Allow explicit naming of `spy` forms
2012-09-21 21:02:58 +07:00
Peter Taoussanis
edf2a13817
Housekeeping
2012-09-02 00:02:06 +07:00
Peter Taoussanis
f58442f355
BREAKING: Clean up config structure. Add prefix-fn option.
...
Changes to config structure:
* [:shared-appender-config :timestamp-pattern] -> :timestamp-pattern
* [:shared-appender-config :locale] -> :timestamp-locale
* Add :prefix-fn
Motivation: timestamp options aren't actually config intended for
appenders. Having them in :shared-appender-config was unnecessarily
confusing.
The addition of :prefix-fn allows full control of prefix strings in a
way that carries over automatically to all appenders. Previously,
adjusting prefix text required modifying appender fns.
Changes to default appenders:
* Drop [:appenders :standard-out]
* [:appenders :standard-out-or-err] -> [:appenders :standard-out]
Motivation: the :standard-out-or-err appender was already the default
anyway, and the presence of the :standard-out appender was just
confusing.
2012-07-26 22:39:21 +07:00
Peter Taoussanis
83c8ff19f7
Add utils ns. Add hostname to default prefix fn.
2012-07-26 15:18:49 +07:00
Peter Taoussanis
ba78e67902
CONFIG CHANGE: Bump aggressiveness of Postal appender's default rate-limiter.
2012-07-23 21:10:01 +07:00
Peter Taoussanis
cca1141c7f
BREAKING: Moved Postal appender to own ns and no longer automatically include Postal as dependency.
...
All future appenders that depend on an external library will follow this pattern, allowing the
flexibility to add more diverse appenders without the worry of bloating Timbre core or Timbre's
dependencies.
See updated README example for how to include standard email appender.
2012-07-13 17:32:23 +07:00
Peter Taoussanis
6807e2b6bd
`str-println` now flushes *out* (Marek Srank).
2012-07-13 16:22:54 +07:00
Peter Taoussanis
068d9bf248
Use `defonce` instead of `def` for config.
2012-07-12 16:33:21 +07:00
Peter Taoussanis
f454ac9afb
Clarified example Postal config.
2012-07-11 13:28:23 +07:00
Peter Taoussanis
d429ccc646
MAD test.
2012-07-05 16:48:14 +07:00
Peter Taoussanis
19f7b898e3
Added Mean Absolute Deviation (MAD) times to profiling output. Misc housekeeping.
2012-07-05 16:39:44 +07:00
Peter Taoussanis
123f3c51d9
Added unaccounted-for timer. Fixed bug with :mean overflow.
2012-07-03 21:16:07 +07:00
Peter Taoussanis
0cb368a0d9
Updated README. Fixed profiler typos. Some other housekeeping.
2012-07-03 19:46:05 +07:00
Peter Taoussanis
bf7c9ff0f6
Cleaned up profiling table display.
2012-07-03 16:54:15 +07:00
Peter Taoussanis
aaca1aac5d
Added timbre.profiling as merge from abandoned Touchstone library.
2012-07-03 16:32:08 +07:00
Peter Taoussanis
0177e7236b
Added ns filtering, `logging-enabled`. Misc housekeeping.
2012-07-03 16:29:11 +07:00
Peter Taoussanis
cfc2a60c8e
BREAKING: New ns structure.
2012-07-03 16:27:20 +07:00
Peter Taoussanis
7dc339aca8
0.5.2
...
* Added check for valid logging level for 'set-level!' and for logging fns.
* Added ':report' level above fatal.
* Fixed arglists for 'log' macro.
* A few other bits of house-keeping.
Signed-off-by: Peter Taoussanis <ptaoussanis@gmail.com>
2012-07-01 18:08:45 +07:00
Peter Taoussanis
6517db3a83
Faster, atomic string printer.
...
* Fixes rare issue with print interleaving.
Signed-off-by: Peter Taoussanis <p.taoussanis@gmail.com>
2012-06-15 18:06:18 +07:00
Peter Taoussanis
5f1862a334
A few minor superficial tweaks.
...
* Updated .gitignore
* Added copyright info to README.
* Added Clojure 1.3 dependency to project.clj.
* Cleaned up some arg names in core.clj.
Signed-off-by: Peter Taoussanis <p.taoussanis@gmail.com>
2012-06-12 22:02:24 +07:00
Peter Taoussanis
f1319b57e7
Allow nil :min-level for appenders.
2012-06-06 00:46:10 +07:00
Peter Taoussanis
2c16d6783c
Simplified appender timestamp args. Improved performance.
...
* Removed 'timestamp-fn' from appender args and replaced with ready-formatted 'timestamp' for simpler appender writing.
* Fixed appender wrapping function bug that was unnecessarily recomputing shared args and timestamp function at runtime.
Signed-off-by: Peter Taoussanis <p.taoussanis@gmail.com>
2012-05-31 00:05:36 +07:00
Peter Taoussanis
fe7e69bf92
Minor breaking: renamed 2 "instant" keys
...
* instant-pattern -> timestamp-pattern
* instant-formatter -> timestamp-fn
Also:
* Updated README.
* A few formatting tweaks.
Signed-off-by: Peter Taoussanis <p.taoussanis@gmail.com>
2012-05-30 20:07:34 +07:00
Peter Taoussanis
dde1b89b03
Added time-format and locale shared-config options.
...
* Also updated README.
Signed-off-by: Peter Taoussanis <p.taoussanis@gmail.com>
2012-05-30 16:15:15 +07:00
Peter Taoussanis
da60e78bbe
Now less choosy about when to recache appenders.
...
* E.g. there was a problem when changing shared-appender config. The new approach is more robust.
Signed-off-by: Peter Taoussanis <p.taoussanis@gmail.com>
2012-05-30 13:35:40 +07:00
Peter Taoussanis
56e1ba9f7c
Improved handling of exceptions without extra arguments
...
* Will now use exception itself as primary message for rate-limiting, etc.
Signed-off-by: Peter Taoussanis <p.taoussanis@gmail.com>
2012-05-28 22:23:56 +07:00
Peter Taoussanis
244749a3e2
Added set-config!, set-level! as per suggestion by Jonathan Fischer Friberg
...
Signed-off-by: Peter Taoussanis <p.taoussanis@gmail.com>
2012-05-28 20:17:38 +07:00
Peter Taoussanis
05403ccd82
Fixed fn privacy issue.
2012-05-28 16:25:43 +07:00
Peter Taoussanis
269cbc1ad9
Performance tweak
...
* Moved expensive shared appender config dereferencing to cache-time wrapping.
Signed-off-by: Peter Taoussanis <p.taoussanis@gmail.com>
2012-05-28 15:34:04 +07:00
Peter Taoussanis
d74de51a05
Initial commit.
...
* Working library.
* Basic README.
Signed-off-by: Peter Taoussanis <p.taoussanis@gmail.com>
2012-05-28 15:13:11 +07:00