Skip to content

Logging doesn't respect active repl iocontext size #50966

@IanButterworth

Description

@IanButterworth
julia> rand(100)
100-element Vector{Float64}:
 0.9470309305802893
 0.4604672694805738
 0.2124314068364419
 0.43966707560777507
 0.9467515153687812
 0.47668391145071143
 0.20105548113956484
 ⋮
 0.04454276400070689
 0.4665932196042042
 0.7968488239182828
 0.3627339909229249
 0.6970054638128076
 0.5336191122628983
 0.1723843238198851
julia> Base.active_repl.options.iocontext[:displaysize] = (1000, displaysize(stdout)[2])
(1000, 148)
julia> rand(100)
100-element Vector{Float64}:
 0.5659276461121842
 0.928128966820746
 0.8955118323124158
 0.589938803011574
... (manually truncated.. all 100 values show)

But any logging in the terminal doesn't respect this new size

julia> @info "msg" rand(100)
┌ Info: msg
│   rand(100) =
│    100-element Vector{Float64}:
│     0.3833331840482638
│     0.6163952296003501
│     0.664416432701147
│     0.19333898976006614
│     0.3699788532572702
│     0.22551883893922164
│     0.398100186732121
│     0.7727166838470204
│     0.5921508365496433
│     ⋮
│     0.7428327511749404
│     0.3637870704086964
│     0.6554499563356997
│     0.787412119878922
│     0.48097170114963217
│     0.7482426574994026
│     0.5390688056935584
│     0.8937004385866616
└     0.8576937113904949

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behaviorloggingThe logging framework

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions