Skip to content

White output unreadable on white background terminal #4673

Closed

Description

@koterpillar

This is a Bug Report

Description

For bug reports:

  • What went wrong?

Serverless outputs some text in a hardcoded white color. On a white background terminal, this is completely unreadable. Examples:

  • Errors ("Serverless Error")

  • Results of function invocation

  • What did you expect should have happened?

Instead of white, the default foreground color should have been used.

  • What was the config you used?

No specific config.

  • What stacktrace or error message from your provider did you see?

Not applicable.

For feature proposals:

  • What is the use case that should be solved. The more detail you describe this in the easier it is to understand for us.
  • If there is additional config how would it look

Similar or dependent issues:

Additional Data

  • Serverless Framework Version you're using: 1.25.0
  • Operating System: linux
  • Stack Trace:
  • Provider Error messages:

serverless-error-white

Activity

  1. HyperBrain commented on Jan 21, 2018

    @HyperBrain
    Contributor

    Hi @koterpillar . Good point.

    I'd suggest that we let users configure a color scheme (maybe light or dark) in the global serverless config file (if present), so that the output color can be easily adjusted for light or dark terminal settings.

    As these discussions very likely run into some religious discussions it would be good to have just both in 😃

  2. koterpillar commented on Jan 21, 2018

    @koterpillar
    ContributorAuthor

    I don't think a separate configuration file is needed, rather the default color should be used for normal messages. I might make a PR similar to how #508 was handled.

  3. HyperBrain commented on Jan 22, 2018

    @HyperBrain
    Contributor

    You can turn off the colors with the --no-color or --no-colors switch (I don't remember what was the correct one), e.g. for CI/CD servers.

    BTW: Currently the errors are sent out to stdout, which is wrong and a PITA when scripting Serverless commands. It would be great, if we can send the errors to stderr correctly, turn colors off there (on stderr) but keep them on stdout.

    What do you think?

  4. koterpillar commented on Jan 29, 2018

    @koterpillar
    ContributorAuthor

    I can use --no-color but it's a bit drastic. The distinction between the standard error and standard output is a valid point, but doesn't address the use case of a white background terminal.

    I've created a pull request that removes explicit white coloring. As there is no output explicitly colored black, I see this as valid - both black on black and white on white would be unreadable.

  5. HyperBrain commented on Jan 29, 2018

    @HyperBrain
    Contributor

    @koterpillar I agree with your approach, removing the explicitly white coloring. You're right, that only the default text color should be used there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions