Make logging initialization more robust

Signed-off-by: Konrad Reiche <konrad.reiche@fokus.fraunhofer.de>