Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fmt::Subscriber NO_COLOR support #2647

Merged
merged 9 commits into from
Aug 17, 2023
Merged

Commits on Jul 13, 2023

  1. fmt::Subscriber NO_COLOR support

    The `NO_COLOR` environment variable should disable all ANSI color
    output (https:://no-color.org).
    
    This commit updates `fmt::Subscriber` to check the `NO_COLOR`
    environment variable before enabling ANSI color output.  As described in
    the spec, any non-empty value set for `NO_COLOR` will prevent `is_ansi`
    from being set to `true`.
    
    fixes tokio-rs#2388
    dmlary committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    8fa10c9 View commit details
    Browse the repository at this point in the history
  2. update to allow NO_COLOR to be overridden

    Re-reading https://no-color.org showed that they do allow overriding of
    the setting with command-line flags.  Similarly, I've removed the
    changes to `fmt::subscriber::with_ansi` and `fmt::subscriber::set_ansi`;
    they will once again set `is_ansi` regardless of `NO_COLOR`.
    dmlary committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    f9f3f8c View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2023

  1. use a Drop guard in NO_COLOR tests

    Co-authored-by: Eliza Weisman <eliza@buoyant.io>
    dmlary and hawkw committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    9bb797c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e56544a View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2023

  1. Configuration menu
    Copy the full SHA
    133f17d View commit details
    Browse the repository at this point in the history
  2. fix to NO_COLOR documentation

    dmlary committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    b5c40b7 View commit details
    Browse the repository at this point in the history
  3. Merge remote-tracking branch 'refs/remotes/origin/subscriber-no_color…

    …' into subscriber-no_color
    dmlary committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    e90ad01 View commit details
    Browse the repository at this point in the history

Commits on Aug 17, 2023

  1. Configuration menu
    Copy the full SHA
    fd00fb9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    218f9c0 View commit details
    Browse the repository at this point in the history