Pluto.jl icon indicating copy to clipboard operation
Pluto.jl copied to clipboard

Progress bar not updating with direct use of `ProgressLogging.progress`

Open yha opened this issue 1 year ago • 1 comments

This should display a progress bar and not show the log message directly, just like when using the @progress macro:

ProgressLogging.progress() do id
    for i = 1:10
        sleep(0.5)
        @info "iterating" progress=i/10 _id=id
    end
end

(this code is from the docs of ProgressLogging.progress) Instead, it shows the @info messages, and only updates the progress bar to 100% at the end.

image

yha avatar Aug 27 '23 19:08 yha

We currently only update the progress when id and log level are the same so for log level == LogLevel(-1).

https://github.com/fonsp/Pluto.jl/blob/137420c7c8a7187a426503f2cf957c29086c9868/frontend/components/Logs.js#L40-L41

Pangoraw avatar Aug 28 '23 11:08 Pangoraw