quick question: can mount :start
and :stop
operations contain side effects?
eg. logging
@jethroksy: you mean a side effect within a start function?
yup
i.e.
(defn start-foo []
(info "side effect")
(do-real-work-to-start-foo))
(defstate foo :start (start-foo))
?yeah exactly that
yep, that'll work
alright thanks!
trying to be careful by limiting where side effects should be
sure. it just calls the function and binds to the return value, so anything you have inside the function will be done
right. usually logging is a good side effect to have :simple_smile:
if we talking pragmatic vs. dogmatic
unless of course the piece you are working on is a logging lib
haha nah it's not it's just a simple web app
yea, I love my logging
keeps me in check
yeah i was getting a little annoyed at how little beanstalk logs told me
can you set its classes to trace, or it just does not have logging?
(I have not used beanstalk)
it didn't have much logging
the other thing is I couldn't tell which docker container was the current one from the logs
so I had tons of logs, but not sure which was from the current app...
it used to show docker ps
, not sure why that stopped
hm.. just read a bit about beanstalk. interesting, probably a good idea to get to know it :simple_smile: