I have a simple macro like this:
macro logit(signal)
:(subscribe!(a ->@error(@sprintf("Debug %s: ", $(string(signal))), a), $(esc(signal))))
end
using MicroLogging
using ReactiveBasics
as = Signal(0)
@logit as
push!(as, 1)
This works quite well.
However, I like to debug multiple signals. I thought sth like this should work:
macro logit2(signals...)
for signal in signals
:(subscribe!(a ->@error(@sprintf("Debug %s: ", $(string(signal))), a), $(esc(signal))))
end
end
bs = Signal(1)
@logit2 bs bs
push!(bs, 2)
But this does not print anything. Any suggestions on that?