{% if log.details.chapter is defined %}

{{ ('log.lesson.log_created_chapter')|trans({}, 'log') }}

{{ ('log_chapter_title')|trans({}, 'log') }}
{{ log.details.chapter.title }}
{% endif %}