Closed kordano closed 4 years ago
Proposal: Error handling should be unified in the way that each error emits a unified log message of the level error. Additionally there should be e.g. deprecation logs for the old way of configuring datahike. That means using a library like clojure/tools.logging for the logging facade.
for clojurescript support https://github.com/ptaoussanis/timbre might be a good option. what do you think?
I agree and timbre is definitely an option. I used a facade in kabel
before:
https://github.com/replikativ/kabel/blob/master/src/kabel/platform_log.cljc
which allows us to change the logging system later as long as we just need a simple interface. It is not externally changeable, just a flexibility for the kabel developers. This limitation should be easy to overcome, either by multimethods or protocols.
@TimoKramer I would leave this decision to you, if you plan to go ahead. Using timbre directly can also be fine if we feel like maintaining a fork if necessary. I generally try to keep interfaces to external libraries minimal to help portability though. How should the interface in your opinion look like?
The exceptions should have a unified concept across all namespaces.