diff --git a/base/logging.jl b/base/logging.jl index 1727fc8b16f76d..72594f557ce20c 100644 --- a/base/logging.jl +++ b/base/logging.jl @@ -638,7 +638,7 @@ function handle_message(logger::SimpleLogger, level::LogLevel, message, _module, filepath, line; kwargs...) @nospecialize maxlog = get(kwargs, :maxlog, nothing) - if maxlog isa Integer + if maxlog isa Core.BuiltinInts remaining = get!(logger.message_limits, id, Int(maxlog)::Int) logger.message_limits[id] = remaining - 1 remaining > 0 || return diff --git a/stdlib/Logging/src/ConsoleLogger.jl b/stdlib/Logging/src/ConsoleLogger.jl index ac4b17b59e14a6..b3f86774a6ef30 100644 --- a/stdlib/Logging/src/ConsoleLogger.jl +++ b/stdlib/Logging/src/ConsoleLogger.jl @@ -101,7 +101,7 @@ function handle_message(logger::ConsoleLogger, level::LogLevel, message, _module @nospecialize hasmaxlog = haskey(kwargs, :maxlog) ? 1 : 0 maxlog = get(kwargs, :maxlog, nothing) - if maxlog isa Integer + if maxlog isa Core.BuiltinInts remaining = get!(logger.message_limits, id, Int(maxlog)::Int) logger.message_limits[id] = remaining - 1 remaining > 0 || return