So far I use a kwarg verbose (0,1,2,inf) to allow diagnostic information during my computation:
verbose && println("message here")
A more systematic way to handle this is using the Logging module and @info, @warn, @error, @debug
. How can I structure this in a context of my module?
module MyModule
using Logging
# my definitions
end
so that later when I call
using MyModule
execute_computation(data; verbose=1)
I can have my desired level of logging. (Not sure if this is the standard way to do this kind of things in Julia.)