JuliaPluto/Pluto.jl

Sticky log messages

オープン

#2,971 opened on 2024/07/29

 (2 件のコメント) (1 件のリアクション) (0 人の担当者)Julia (329 件のフォーク)batch import
frontendgood first issuelogging

Repository metrics

Stars
 (5,295 個のスター)
PR merge metrics
 (平均マージ 5d 12h) (30d で 13 merged PRs)

説明

I sometimes wish I could use @info to update an existing log message. Imagine the following, with each invocation of @info "..." sticky=true updating the same log card instead of adding a new one:

let
    keepgoing(i) = (i < rand(51:100))
    i = 1
    while keepgoing(i)
        @info "i = $i" sticky=true
        sleep(0.1)
        i += 1
    end
end

This is an example where it's impossible to calculate a % complete, so ProgressLogging is unsuitable, but I'd still like to see an indicator of forward progress. The sticky=true keyword seems to have some precedence from the old days of Juno, see https://github.com/JuliaLogging/ProgressLogging.jl/issues/23#issuecomment-594218835.

コントリビューターガイド