Create all logging facilities : data, event, commands

-some asserts added
-better cleanup
-daemon lifecycle described