dialog icon indicating copy to clipboard operation
dialog copied to clipboard

Is dialog a drop in replacement for timbre API ?

Open ieugen opened this issue 3 years ago • 2 comments

Hi,

We are using timbre and looking at dialog because we can't have unified logging with timbre. We are using slf4j-timbre but I can't filter out apache loggers. Also the library is not in sync with timbre and there is also https://github.com/fzakaria/slf4j-timbre/issues/40 .

p.s. Implementing slf4j API I don't expect dialog to work in CLJS as timbre does.

ieugen avatar Nov 03 '22 19:11 ieugen

Depends on how you're consuming Timbre - dialog provides the same set of trace/debug/info/warn/error/fatal "print" loggers as well as the corresponding infof etc "format" loggers. This also matches the API provided by clojure.tools.logging, so if you're using that style of logging then things shouldn't need much if any changes.

For more structured logging, you'd use dialog.logger/log-event to provide maps with key/value entries, some of which are the standard :level, :logger, :message, etc. This is the equivalent of timbre/log! function, if I am reading the code correctly.

greglook avatar Nov 03 '22 20:11 greglook

I found that dialog.logger does not contain log or spy from timbre.

ieugen avatar Nov 04 '22 14:11 ieugen