Skip to content

Commit

Permalink
[mod] [DEPRECATED] :msg_ is now undocumented
Browse files Browse the repository at this point in the history
Status

  While now undocumented, backwards compatibility will be retained since:
    1. The back compatibility is cheap and simple
    2. Appenders in the wild may already depend on the argument
       (incl. several community appenders)

Motivation

  The problem with :msg_ is that its behaviour can't be easily customized,
  and customization can be useful (e.g. for #356).

  So instead of hard-coding a particular :msg_ generator as before, the
  responsibility of message generation will now be handled as just another
  aspect of output generation (i.e. handled by output-fns).

  Note that output fns already have rich customization facilities, incl.
  per-appender fn and options overrides.
  • Loading branch information
ptaoussanis committed Oct 23, 2022
1 parent 841a064 commit 65c3b47
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/taoensso/timbre.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,6 @@
:?meta ; First-arg map when it has ^:meta metadata, used as a
way of passing advanced per-call options to appenders
:vargs ; Vector of raw args provided to logging call
:msg_ ; Forceable - args as a string
:timestamp_ ; Forceable - string
:hostname_ ; Forceable - string (clj only)
:output-fn ; (fn [data]) -> final output for use by appenders
Expand Down Expand Up @@ -727,7 +726,7 @@
data (assoc data :vargs_ (delay vargs)) ; Deprecated
data
(enc/assoc-nx data
:msg_ (delay (default-output-msg-fn data))
:msg_ (delay (default-output-msg-fn data)) ; Deprecated
:hash_ ; Identify unique logging "calls" for rate limiting, etc.
(delay
(hash
Expand Down

0 comments on commit 65c3b47

Please sign in to comment.