diff --git a/Project.toml b/Project.toml index 29b23e6..bbe00c6 100644 --- a/Project.toml +++ b/Project.toml @@ -9,6 +9,7 @@ Logging = "56ddb016-857b-54e1-b83d-db4d58db5568" LoggingCommon = "44db15ec-78df-42c5-8c4e-36d253f36098" [compat] -Dictionaries = "0.3" +Dictionaries = "0.3, 0.4" +Logging = "1" LoggingCommon = "1.0.1" julia = "1.6" \ No newline at end of file diff --git a/src/hierarchical_logger.jl b/src/hierarchical_logger.jl index decaa0a..f4fc7a9 100644 --- a/src/hierarchical_logger.jl +++ b/src/hierarchical_logger.jl @@ -220,6 +220,7 @@ Logging.shouldlog(h::HierarchicalLogger, level::Symbol, args...) = shouldlog(h, Logging.catch_exceptions(logger::HierarchicalLogger) = catch_exceptions(logger[ROOT_LOGGER_KEY]) function Logging.handle_message(h::HierarchicalLogger, level, message, _module, args...; kwargs...) + @nospecialize logger = h[_module] handle_message(logger, level, message, _module, args...; kwargs...)