Skip to content

Commit 4de81b2

Browse files
jpsamarooJamesWrigley
authored andcommitted
dagdebug: Add JULIA_DAGGER_DEBUG config variable
1 parent 332a330 commit 4de81b2

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/Dagger.jl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,20 @@ function __init__()
153153
ThreadProc(myid(), tid)
154154
end
155155
end
156+
157+
# Set up @dagdebug categories, if specified
158+
try
159+
if haskey(ENV, "JULIA_DAGGER_DEBUG")
160+
empty!(DAGDEBUG_CATEGORIES)
161+
for category in split(ENV["JULIA_DAGGER_DEBUG"], ",")
162+
if category != ""
163+
push!(DAGDEBUG_CATEGORIES, Symbol(category))
164+
end
165+
end
166+
end
167+
catch err
168+
@warn "Error parsing JULIA_DAGGER_DEBUG" exception=err
169+
end
156170
end
157171

158172
end # module

0 commit comments

Comments
 (0)