Feature/log disconnected rebased

rebased #980 . See that issue to learn the discussion.