Fixed issue around exclude
This commit is contained in:
+1
-1
@@ -28,7 +28,7 @@ module Logger
|
|||||||
macro log_with_context(level, message)
|
macro log_with_context(level, message)
|
||||||
{% if @def && @def.annotation(LogMethod) %}
|
{% if @def && @def.annotation(LogMethod) %}
|
||||||
{% anno = @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)} %}
|
{% args = @def.args.reject{|a| exclude.includes?(a.name)} %}
|
||||||
{% unless args.empty? %}
|
{% unless args.empty? %}
|
||||||
Log.with_context( {% for arg in args %} {{arg.name}}: {{arg.name}}, {% end %} ) do
|
Log.with_context( {% for arg in args %} {{arg.name}}: {{arg.name}}, {% end %} ) do
|
||||||
|
|||||||
Reference in New Issue
Block a user