If logfile cannot be opened fall back to the NULL logger

This fixes #7706

@s0undt3ch, please take a look for a more elegant solution here, but
we should be safe turning off logging for the salt command in this case