dict.get(item) vs dict[item] fixes the KeyError when you have a custom formatter variable and a logger did not include it.