logging fail-safe mechanism