diff --git a/src/Resources/config/services.yml b/src/Resources/config/services.yml
index 9b70a4b..f7380af 100644
--- a/src/Resources/config/services.yml
+++ b/src/Resources/config/services.yml
@@ -15,3 +15,7 @@ services:
IbexaLogsUi\Bundle\EventSubscriber\MenuSubscriber:
tags:
- { name: kernel.event_subscriber }
+
+ IbexaLogsUi\Bundle\Twig\DumpLogExtension:
+ tags:
+ - { name: twig.extension }
diff --git a/src/Resources/views/themes/admin/logs/logs.html.twig b/src/Resources/views/themes/admin/logs/logs.html.twig
index c75f1e5..c02c4c9 100644
--- a/src/Resources/views/themes/admin/logs/logs.html.twig
+++ b/src/Resources/views/themes/admin/logs/logs.html.twig
@@ -92,20 +92,20 @@
- {{ profiler_dump_log(log.message, log.context) }}
+ {{ dump_log_message(log.message, log.context) }}
{% if log.context is not empty or log.extra is not empty %}
{{ 'logs_ui.text.show_more'|trans }}
{% if log.context is not empty %}
{{ 'logs_ui.text.context'|trans }}
- {{ profiler_dump(log.context, maxDepth=1) }}
+ {{ dump_log_context(log.context, maxDepth=1) }}
{% endif %}
{% if log.extra is not empty %}
{{ 'logs_ui.text.extra'|trans }}
- {{ profiler_dump(log.extra, maxDepth=1) }}
+ {{ dump_log_context(log.extra, maxDepth=1) }}
{% endif %}
diff --git a/src/Twig/DumpLogExtension.php b/src/Twig/DumpLogExtension.php
new file mode 100644
index 0000000..6eda0bc
--- /dev/null
+++ b/src/Twig/DumpLogExtension.php
@@ -0,0 +1,28 @@
+ ['html'],
+ 'needs_environment' => true
+ ]),
+ new TwigFunction('dump_log_context', [$this, 'dumpData'], [
+ 'is_safe' => ['html'],
+ 'needs_environment' => true
+ ]),
+ ];
+ }
+}
|