Enable logging of undefined template keys only when debug mode is on.