Add some logging functionnality
Add a heartbeat timeout in the case of mirroring.

Signed-off-by: Martin Raspaud <martin.raspaud@smhi.se>