Skip to content

--color=no is ignored #63

@anj00

Description

@anj00

From that I understand looking at the code Bukdu forces color output for logging even if julia is started with julia --color=no. This creates pretty messy logging in terminals which don't support color (in my case aws console)

I have the following workaround for now in my code:

#fix bug in Bukdu, which forces color output, ignoring command line arguments
force_bw = Base.JLOptions().color == 2
import Base.IOContext
using Base: ImmutableDict, unwrapcontext
function Base.IOContext(io::IO, dict::ImmutableDict)
    force_bw ? dict = ImmutableDict(dict, :color => false) : nothing
    io0 = unwrapcontext(io)[1]
    IOContext{typeof(io0)}(io0, dict)
end

ideally of course Bukdu should respect --color=no switch in julia

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions