Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression for timbre v6 #67

Open
vincentjames501 opened this issue Aug 2, 2023 · 2 comments · May be fixed by #68
Open

Regression for timbre v6 #67

vincentjames501 opened this issue Aug 2, 2023 · 2 comments · May be fixed by #68

Comments

@vincentjames501
Copy link

On v5, this line of code (https://github.com/fzakaria/slf4j-timbre/blob/master/src/slf4j_timbre/factory.clj#L15) outputs:

(require '[taoensso.timbre :as timbre])
=> nil
(= timbre/*config* (var-get (resolve 'taoensso.timbre/example-config)))
=> true
timbre/*config*
=>
{:min-level :debug,
 :ns-filter #{"*"},
 :middleware [],
 :timestamp-opts {:pattern :iso8601, :locale :jvm-default, :timezone :utc},
 :output-fn #object[taoensso.timbre$default_output_fn 0x2907b20b "taoensso.timbre$default_output_fn@2907b20b"],
 :appenders {:println {:enabled? true,
                       :async? false,
                       :min-level nil,
                       :rate-limit nil,
                       :output-fn :inherit,
                       :fn #object[taoensso.timbre.appenders.core$println_appender$fn__5755
                                   0x320defc8
                                   "taoensso.timbre.appenders.core$println_appender$fn__5755@320defc8"]}}}

on v6 it outputs:

(require '[taoensso.timbre :as timbre])
=> nil
(= timbre/*config* (var-get (resolve 'taoensso.timbre/example-config)))
=> false
timbre/*config*
=>
{:min-level :debug,
 :ns-filter #{"*"},
 :middleware [],
 :timestamp-opts {:pattern :iso8601, :locale :jvm-default, :timezone :utc},
 :output-fn #object[taoensso.timbre$default_output_fn 0x53b7e015 "taoensso.timbre$default_output_fn@53b7e015"],
 :appenders {:println {:enabled? true,
                       :fn #object[taoensso.timbre.appenders.core$println_appender$fn__5835
                                   0x512839d8
                                   "taoensso.timbre.appenders.core$println_appender$fn__5835@512839d8"]}},
 :_init-config {:loaded-from-source :default, :compile-time-config {:min-level nil, :ns-pattern "*"}}}

This is because :_init-config is now present in timbre/*config* but not in (var-get (resolve 'taoensso.timbre/example-config)).

Because of this, it causes #32 to come back with v6 of timbre and the latest version of this library.

vincentjames501 pushed a commit to vincentjames501/slf4j-timbre that referenced this issue Aug 2, 2023
@vincentjames501 vincentjames501 linked a pull request Aug 2, 2023 that will close this issue
@ptaoussanis
Copy link

@vincentjames501 Hi Vincent - in case this is still relevant for you, you might want to try Timbre v6.6.0-RC1 which now includes built-in SLF4J(v2) support that'll always be automatically kept in-sync with the latest Timbre release.

@vincentjames501
Copy link
Author

@ptaoussanis , this is great! We'll roll this into our internal logging library that leverages timbre soon. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants