Added support for logging twig templates with an error