camsaul / toucan2

Successor library to Toucan with a modern and more-extensible API, more consistent behavior, and support for different backends including non-JDBC databases and non-HoneySQL queries. Currently in active beta.
Eclipse Public License 1.0
81 stars 11 forks source link

invalid log syntax breaks metabase startup #161

Closed dpsutton closed 9 months ago

dpsutton commented 9 months ago

https://github.com/metabase/metabase/issues/38516

https://github.com/camsaul/toucan2/blob/master/src/toucan2/honeysql2.clj#L47

There seems to be some confusion about "topics" for logs. https://github.com/camsaul/toucan2/pull/28 introduced topics for log messages

image

And then https://github.com/camsaul/toucan2/pull/137 removed them. We seem to have one remaining call. And if your log level is fine enough to have it attempt to log, it will crash in metabase startup when setting up the sample database.

  (testing "invalid topic"
    (is (thrown?
         clojure.lang.Compiler$CompilerException
         (macroexpand `(log/infof :fake-topic "VERY NICE MESSAGE %s")))))