Skip to content

Commit 1e3ee49

Browse files
authored
Check whether debug logs would actually get logged.
1 parent 689f985 commit 1e3ee49

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/debug.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# debug functionality
22

3-
isdebug(group, mod=CUDA) =
4-
Base.CoreLogging.current_logger_for_env(Base.CoreLogging.Debug, group, mod) !== nothing
3+
function isdebug(group, mod=CUDA)
4+
level = Base.CoreLogging.Debug
5+
logger = Base.CoreLogging.current_logger_for_env(level, group, mod)
6+
# TODO: Which id to choose here instead of 0?
7+
logger !== nothing && Base.CoreLogging.shouldlog(logger, level, mod, group, 0)
8+
end

0 commit comments

Comments
 (0)