Formatting Logging


#1

I was using printfmtln from Formatting.jl. Now I want to change my code to use MicroLogging.jl. Is there a neat way to do it?
I need something like this

printfmtln("{:2d}) Loss={:.6f} |β|={:.2f}", iter, loss(β), sum(abs.(β)))

to be

@debug format("{:2d}) Loss={:.6f} |β|={:.2f}", iter, loss(β), sum(abs.(β)))

#2

How about:
@debug f"\%2d(iter)) Loss=\%.2f(loss(β)) |β|=\%.2f(sum(abs.(β)))"

If you like that, do Pkg.add("StringLiterals") and then using StringLiterals.