Fixed issue around exclude

This commit is contained in:
Tristan Ancelet
2026-08-22 15:22:13 -05:00
parent e4212b265e
commit f6acc9dcf7
+1 -1
View File
@@ -28,7 +28,7 @@ module Logger
macro log_with_context(level, message)
{% if @def && @def.annotation(LogMethod) %}
{% anno = @def.annotation(LogMethod) %}
{% exclude = anno[:exclude].map(&.id) || [] of MacroId %}
{% exclude = (anno[:exclude] || [] of MacroId).map(&.id) %}
{% args = @def.args.reject{|a| exclude.includes?(a.name)} %}
{% unless args.empty? %}
Log.with_context( {% for arg in args %} {{arg.name}}: {{arg.name}}, {% end %} ) do