Fork me on GitHub
#component
<
2021-07-14
>
Eugen07:07:45

hi there, I found out about component in a project I am working on. I would like to add log messages around start and stop functions. The idea is that in production I would like to see when each component lifecicle method bgins and ends. Is there a way to do this besides addind the code to each start/stop component?

Eugen07:07:19

something like this:

(start [component]
         (info "Starting Database component") ;; <<<<<<<
         (let [conn (conman/connect! pool-spec)
               result (assoc conn :connection conn)]
           (info "Started Database component") ;; <<<<<
           result))