Skip to content

Commit

Permalink
Quick fix for ProgressLogging 0.1.1
Browse files Browse the repository at this point in the history
really fix #9
  • Loading branch information
tkf committed Mar 2, 2020
1 parent 3cf57d4 commit 898fe0a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ConsoleProgressMonitor.jl
Expand Up @@ -34,14 +34,14 @@ const default_colors = [
struct ProgressLogger <: Logging.AbstractLogger
options::NamedTuple
colors::Vector{Symbol}
bars::Dict{Symbol,Progress}
lastid::typeof(Ref(:_))
bars::Dict{Any,Progress}
lastid::typeof(Ref{Any}(:_))
end

const _noid = gensym(:_noid)

ProgressLogger(options::NamedTuple, colors::Vector{Symbol} = default_colors) =
ProgressLogger(options, colors, Dict(), Ref(_noid))
ProgressLogger(options, colors, Dict(), Ref{Any}(_noid))
ProgressLogger(; colors = default_colors, options...) =
ProgressLogger((; options...), colors)

Expand Down Expand Up @@ -77,7 +77,7 @@ function Logging.handle_message(
progress = isnan(progress) ? 0.0 : progress
counter = floor(Int, progress * n)

desc = somestring(title, message, p.desc)
desc = somestring(string(title), message, p.desc)
if !endswith(desc, " ")
desc = string(desc, ": ")
end
Expand Down

0 comments on commit 898fe0a

Please sign in to comment.