-
-
Notifications
You must be signed in to change notification settings - Fork 95
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
unify error handling #54
Comments
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 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? |
Using weavejester/environ to pull configuration from environment and java system properties. Additionally offering the ability to reload the config on the fly with additional options passed as args. Storing config in a record that is instantiated on startup. Now it is not necessary anymore to pass any URI to create a database nor to connect to it. Config is read during startup and pulls from environment and java system properties. Defaulting to database in memory etc. like before. The old way to instantiate and connect is still supported but marked as deprecated. There should be a log in the future to indicate this status for the user using the old way. - Closes #82 - References #54 Squashed commit of the following: commit 121dded211a3f2db7b1886eca6f21096408e8400 Author: Timo Kramer <fw-git@timokramer.de> Date: Fri Apr 3 19:44:00 2020 +0200 added tests and implemented requested changes commit f5bddd0 Author: Timo Kramer <fw-git@timokramer.de> Date: Fri Mar 20 15:43:23 2020 +0100 switched to namespace var to not run config-function all the time commit 78016b9 Author: Timo Kramer <fw-git@timokramer.de> Date: Wed Mar 18 18:23:37 2020 +0100 added documentation commit acbf85c Author: Timo Kramer <fw-git@timokramer.de> Date: Wed Mar 18 18:23:25 2020 +0100 multi-arity load-config to possibly pass a config map commit 9cf880e Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Mar 12 20:45:39 2020 +0100 forgot to stage project.clj commit 007be7a Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Mar 12 20:05:07 2020 +0100 implemented protocol for Configuration-record commit 9ff3c67 Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Mar 12 18:32:44 2020 +0100 switched to environ as dependency for easier handling of config deprecated parts of config because future use should be via load-config commit a1baa87 Author: Timo Kramer <fw-git@timokramer.de> Date: Wed Mar 11 22:28:11 2020 +0100 load-config function with merging file and defaults commit 445bdab Author: Timo Kramer <fw-git@timokramer.de> Date: Wed Mar 11 18:32:01 2020 +0100 simple merge function commit 8f3539d Author: Timo Kramer <fw-git@timokramer.de> Date: Tue Mar 10 18:12:00 2020 +0100 some more testing and exception handling commit 4a981d9 Author: Timo Kramer <fw-git@timokramer.de> Date: Mon Mar 9 16:00:35 2020 +0100 specing functions commit 90d309c Author: Timo Kramer <fw-git@timokramer.de> Date: Mon Mar 9 13:45:51 2020 +0100 first shot at loading config from file
To unify error handling I moved the raise macro in the tools namespace to access it easily from everywhere. It now is capable to be used by clj and cljs. There is an error logged everytime the raise macro is called. For logging I introduced taoensso.timbre to be able to log in Clojure and Clojurescript. This library supports both structured and unstructured logging and suits our needs for log analysis. The macros of this library can be called where needed and can process all data structures. - Closes #54 Squashed commit of the following: commit f59e83d Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Apr 30 17:32:48 2020 +0200 set log-level for tests to fatal commit 35f4cf2 Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Apr 30 17:02:59 2020 +0200 using log directly is best commit 4d484c6 Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Apr 30 15:55:48 2020 +0200 transact has special sauce commit abe0bac Author: Timo Kramer <fw-git@timokramer.de> Date: Wed Apr 29 15:18:15 2020 +0200 implemented logging and error handling in tools namespace commit 902411c Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Apr 9 20:31:30 2020 +0200 raise moved to tools namespace
To unify error handling I moved the raise macro in the tools namespace to access it easily from everywhere. It now is capable to be used by clj and cljs. There is an error logged everytime the raise macro is called. For logging I introduced taoensso.timbre to be able to log in Clojure and Clojurescript. This library supports both structured and unstructured logging and suits our needs for log analysis. The macros of this library can be called where needed and can process all data structures. - Closes #54 Squashed commit of the following: commit f59e83d Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Apr 30 17:32:48 2020 +0200 set log-level for tests to fatal commit 35f4cf2 Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Apr 30 17:02:59 2020 +0200 using log directly is best commit 4d484c6 Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Apr 30 15:55:48 2020 +0200 transact has special sauce commit abe0bac Author: Timo Kramer <fw-git@timokramer.de> Date: Wed Apr 29 15:18:15 2020 +0200 implemented logging and error handling in tools namespace commit 902411c Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Apr 9 20:31:30 2020 +0200 raise moved to tools namespace
To unify error handling I moved the raise macro in the tools namespace to access it easily from everywhere. It now is capable to be used by clj and cljs. There is an error logged everytime the raise macro is called. For logging I introduced taoensso.timbre to be able to log in Clojure and Clojurescript. This library supports both structured and unstructured logging and suits our needs for log analysis. The macros of this library can be called where needed and can process all data structures. - Closes #54 - added documentation as extra page under doc/ Squashed commit of the following: commit f59e83d Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Apr 30 17:32:48 2020 +0200 set log-level for tests to fatal commit 35f4cf2 Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Apr 30 17:02:59 2020 +0200 using log directly is best commit 4d484c6 Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Apr 30 15:55:48 2020 +0200 transact has special sauce commit abe0bac Author: Timo Kramer <fw-git@timokramer.de> Date: Wed Apr 29 15:18:15 2020 +0200 implemented logging and error handling in tools namespace commit 902411c Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Apr 9 20:31:30 2020 +0200 raise moved to tools namespace
To unify error handling I moved the raise macro in the tools namespace to access it easily from everywhere. It now is capable to be used by clj and cljs. There is an error logged everytime the raise macro is called. For logging I introduced taoensso.timbre to be able to log in Clojure and Clojurescript. This library supports both structured and unstructured logging and suits our needs for log analysis. The macros of this library can be called where needed and can process all data structures. - Closes #54 - added documentation as extra page under doc/ Squashed commit of the following: commit f59e83d Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Apr 30 17:32:48 2020 +0200 set log-level for tests to fatal commit 35f4cf2 Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Apr 30 17:02:59 2020 +0200 using log directly is best commit 4d484c6 Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Apr 30 15:55:48 2020 +0200 transact has special sauce commit abe0bac Author: Timo Kramer <fw-git@timokramer.de> Date: Wed Apr 29 15:18:15 2020 +0200 implemented logging and error handling in tools namespace commit 902411c Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Apr 9 20:31:30 2020 +0200 raise moved to tools namespace
To unify error handling I moved the raise macro in the tools namespace to access it easily from everywhere. It now is capable to be used by clj and cljs. There is an error logged everytime the raise macro is called. For logging I introduced taoensso.timbre to be able to log in Clojure and Clojurescript. This library supports both structured and unstructured logging and suits our needs for log analysis. The macros of this library can be called where needed and can process all data structures. - Closes replikativ#54 - added documentation as extra page under doc/ Squashed commit of the following: commit f59e83d Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Apr 30 17:32:48 2020 +0200 set log-level for tests to fatal commit 35f4cf2 Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Apr 30 17:02:59 2020 +0200 using log directly is best commit 4d484c6 Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Apr 30 15:55:48 2020 +0200 transact has special sauce commit abe0bac Author: Timo Kramer <fw-git@timokramer.de> Date: Wed Apr 29 15:18:15 2020 +0200 implemented logging and error handling in tools namespace commit 902411c Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Apr 9 20:31:30 2020 +0200 raise moved to tools namespace
To unify error handling I moved the raise macro in the tools namespace to access it easily from everywhere. It now is capable to be used by clj and cljs. There is an error logged everytime the raise macro is called. For logging I introduced taoensso.timbre to be able to log in Clojure and Clojurescript. This library supports both structured and unstructured logging and suits our needs for log analysis. The macros of this library can be called where needed and can process all data structures. The biggest problem is bug CLJ-865 in Clojure that prevents passing line numbers between macros. Luckily timbre is awesome and has a low level macro that makes it possible to circumvent this bug. After a lot of fiddling it is now possible to use a raise macro in the tools namespace and see line numbers in the logs. - Closes replikativ#54 - Great! taoensso/timbre@36785d6 Squashed commit of the following: commit f59e83d Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Apr 30 17:32:48 2020 +0200 set log-level for tests to fatal commit 35f4cf2 Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Apr 30 17:02:59 2020 +0200 using log directly is best commit 4d484c6 Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Apr 30 15:55:48 2020 +0200 transact has special sauce commit abe0bac Author: Timo Kramer <fw-git@timokramer.de> Date: Wed Apr 29 15:18:15 2020 +0200 implemented logging and error handling in tools namespace commit 902411c Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Apr 9 20:31:30 2020 +0200 raise moved to tools namespace
To unify error handling I moved the raise macro in the tools namespace to access it easily from everywhere. It now is capable to be used by clj and cljs. There is an error logged everytime the raise macro is called. For logging I introduced taoensso.timbre to be able to log in Clojure and Clojurescript. This library supports both structured and unstructured logging and suits our needs for log analysis. The macros of this library can be called where needed and can process all data structures. The biggest problem is bug CLJ-865 in Clojure that prevents passing line numbers between macros. Luckily timbre is awesome and has a low level macro that makes it possible to circumvent this bug. After a lot of fiddling it is now possible to use a raise macro in the tools namespace and see line numbers in the logs. - Closes replikativ#54 - Great! taoensso/timbre@36785d6 Squashed commit of the following: commit f59e83d Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Apr 30 17:32:48 2020 +0200 set log-level for tests to fatal commit 35f4cf2 Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Apr 30 17:02:59 2020 +0200 using log directly is best commit 4d484c6 Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Apr 30 15:55:48 2020 +0200 transact has special sauce commit abe0bac Author: Timo Kramer <fw-git@timokramer.de> Date: Wed Apr 29 15:18:15 2020 +0200 implemented logging and error handling in tools namespace commit 902411c Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Apr 9 20:31:30 2020 +0200 raise moved to tools namespace
To unify error handling I moved the raise macro in the tools namespace to access it easily from everywhere. It now is capable to be used by clj and cljs. There is an error logged everytime the raise macro is called. For logging I introduced taoensso.timbre to be able to log in Clojure and Clojurescript. This library supports both structured and unstructured logging and suits our needs for log analysis. The macros of this library can be called where needed and can process all data structures. The biggest problem is bug CLJ-865 in Clojure that prevents passing line numbers between macros. Luckily timbre is awesome and has a low level macro that makes it possible to circumvent this bug. After a lot of fiddling it is now possible to use a raise macro in the tools namespace and see line numbers in the logs. - Closes #54 - Great! taoensso/timbre@36785d6 Squashed commit of the following: commit f59e83d Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Apr 30 17:32:48 2020 +0200 set log-level for tests to fatal commit 35f4cf2 Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Apr 30 17:02:59 2020 +0200 using log directly is best commit 4d484c6 Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Apr 30 15:55:48 2020 +0200 transact has special sauce commit abe0bac Author: Timo Kramer <fw-git@timokramer.de> Date: Wed Apr 29 15:18:15 2020 +0200 implemented logging and error handling in tools namespace commit 902411c Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Apr 9 20:31:30 2020 +0200 raise moved to tools namespace
To unify error handling I moved the raise macro in the tools namespace to access it easily from everywhere. It now is capable to be used by clj and cljs. There is an error logged everytime the raise macro is called. For logging I introduced taoensso.timbre to be able to log in Clojure and Clojurescript. This library supports both structured and unstructured logging and suits our needs for log analysis. The macros of this library can be called where needed and can process all data structures. The biggest problem is bug CLJ-865 in Clojure that prevents passing line numbers between macros. Luckily timbre is awesome and has a low level macro that makes it possible to circumvent this bug. After a lot of fiddling it is now possible to use a raise macro in the tools namespace and see line numbers in the logs. - Closes #54 - Great! taoensso/timbre@36785d6 - documentation of logging and error handling Squashed commit of the following: commit f59e83d Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Apr 30 17:32:48 2020 +0200 set log-level for tests to fatal commit 35f4cf2 Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Apr 30 17:02:59 2020 +0200 using log directly is best commit 4d484c6 Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Apr 30 15:55:48 2020 +0200 transact has special sauce commit abe0bac Author: Timo Kramer <fw-git@timokramer.de> Date: Wed Apr 29 15:18:15 2020 +0200 implemented logging and error handling in tools namespace commit 902411c Author: Timo Kramer <fw-git@timokramer.de> Date: Thu Apr 9 20:31:30 2020 +0200 raise moved to tools namespace
unifying error handling and introducing logging
The exceptions should have a unified concept across all namespaces.
The text was updated successfully, but these errors were encountered: