diff --git a/src/ensemble/basic_ensemble_solve.jl b/src/ensemble/basic_ensemble_solve.jl index 6187a82bf8..adc3b8b5cc 100644 --- a/src/ensemble/basic_ensemble_solve.jl +++ b/src/ensemble/basic_ensemble_solve.jl @@ -1,4 +1,4 @@ -using Logging +using Logging, ChainRulesCore """ $(TYPEDEF) """ @@ -41,6 +41,7 @@ end AggregateLogger(logger::AbstractLogger) = AggregateLogger(Dict{Symbol, Float64}(),0 , 0.0, 0.0, ReentrantLock(), logger) function Logging.handle_message(l::AggregateLogger, level, message, _module, group, id, file, line; kwargs...) + @ignore_derivatives begin if convert(LogLevel, level) == LogLevel(-1) && haskey(kwargs, :progress) pr = kwargs[:progress] if trylock(l.lock) || (pr == "done" && lock(l.lock)===nothing) @@ -83,6 +84,7 @@ function Logging.handle_message(l::AggregateLogger, level, message, _module, gro end end Logging.handle_message(l.logger, level, message, _module, group, id, file, line; kwargs...) + end # ignore_derivatives end Logging.shouldlog(l::AggregateLogger, args...) = Logging.shouldlog(l.logger, args...) Logging.min_enabled_level(l::AggregateLogger) = Logging.min_enabled_level(l.logger)