Skip to content

Commit 03e6842

Browse files
committed
Fix comments
1 parent 8eec9e9 commit 03e6842

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/logging.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ macro ifwithprogresslogger(cond, exprs...)
55
return esc(
66
quote
77
if $cond
8-
# If progress == true, then we want to create a new logger. Note that
9-
# progress might not be a Bool.
8+
# Create a new logger
109
if $hasprogresslevel($Logging.current_logger())
1110
$ProgressLogging.@withprogress $(exprs...)
1211
else
@@ -15,8 +14,9 @@ macro ifwithprogresslogger(cond, exprs...)
1514
end
1615
end
1716
else
18-
# otherwise, progress isa UUID, or a channel, or false, in
19-
# which case we don't want to create a new logger.
17+
# Don't create a new logger, either because progress logging
18+
# was disabled, or because it's otherwise being manually
19+
# managed.
2020
$(exprs[end])
2121
end
2222
end,
@@ -27,8 +27,10 @@ macro log_progress_dispatch(progress, progressname, progress_frac)
2727
return esc(
2828
quote
2929
if $progress == true
30+
# Use global logger
3031
$ProgressLogging.@logprogress $progress_frac
3132
elseif $progress isa $UUIDs.UUID
33+
# Use the logger with this specific UUID
3234
$ProgressLogging.@logprogress $progressname $progress_frac _id = $progress
3335
else
3436
# progress == false, or progress isa Channel, both of which are

0 commit comments

Comments
 (0)