Skip to content

Commit 9f8970d

Browse files
committed
Rename withprogresslogger macro
1 parent 4cd647a commit 9f8970d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/logging.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ finish_progress(::ChannelProgress) = nothing
9595

9696
# Add a custom progress logger if the current logger does not seem to be able to handle
9797
# progress logs.
98-
macro withprogresslogger(expr)
98+
macro maybewithricherlogger(expr)
9999
return esc(
100100
quote
101101
if !($hasprogresslevel($Logging.current_logger()))

src/sample.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ function mcmcsample(
168168
start = time()
169169
local state
170170

171-
@withprogresslogger begin
171+
@maybewithricherlogger begin
172172
init_progress(progress)
173173
# Determine threshold values for progress logging (by default, one
174174
# update per 0.5% of progress, unless this has been passed in
@@ -321,7 +321,7 @@ function mcmcsample(
321321
start = time()
322322
local state
323323

324-
@withprogresslogger begin
324+
@maybewithricherlogger begin
325325
init_progress(progress)
326326
# Obtain the initial sample and state.
327327
sample, state = if num_warmup > 0
@@ -464,7 +464,7 @@ function mcmcsample(
464464
# Set up a chains vector.
465465
chains = Vector{Any}(undef, nchains)
466466

467-
@withprogresslogger begin
467+
@maybewithricherlogger begin
468468
if progress == :perchain
469469
# Create a channel for each chain to report back to when it
470470
# finishes sampling.
@@ -661,7 +661,7 @@ function mcmcsample(
661661
pool = Distributed.CachingPool(Distributed.workers())
662662

663663
local chains
664-
@withprogresslogger begin
664+
@maybewithricherlogger begin
665665
# Set up progress logging.
666666
if progress == :overall
667667
# Just a single progress bar for the entire sampling, but instead

0 commit comments

Comments
 (0)