Inside Logging documentation, it says “the logging tools allow you to attach arbitrary data to each event as a set of key–value pairs. This allows you to capture local variables and other program state for later analysis”.
Well, I want to do that:
using Logging
times7 = Dict{Int, Int}()
function logtest(n::Int)
for i in 1:n
if i % 7 == 0
@info "divisible by 7" times7[i] = (i / 7)^2
end
end
end
logger = SimpleLogger()
with_logger(logger) do
logtest(100)
end
So, I want to view the logged records later on (records inside logger). Maybe to compute some statistics or plotting the algorithm history, etc. Is this possible?