Skip to content

with_logger(NullLogger()) allocates in v1.11 #55761

Open
@rfourquet

Description

@rfourquet

This is a regression from v1.10, but OK to close if considered normal.

julia> using Logging; f() = with_logger(NullLogger()) do
           @debug "f"
       end

julia> @allocations f(); @allocations f()
8 # was 0 on v1.10

NullLogger() was useful to make logging macros essentially free when not used.
A workaround is to use Logging.disable_logging(Logging.Debug).

Metadata

Metadata

Assignees

No one assigned

    Labels

    loggingThe logging frameworkperformanceMust go fasterregressionRegression in behavior compared to a previous versionregression 1.11Regression in the 1.11 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions