Skip to content

Permit warning and error messages to be distinguished from their text #6298

@cjerdonek

Description

@cjerdonek

This issue is to prefix warning and error messages in pip's log output.

Background:

Currently, it's possible not to notice warning or error messages in pip's logs, or even not to know about them at all. I think the main reason for this is that the text doesn't distinguish them (e.g. with customary WARNING and ERROR prefixes). For example, for me it was only recently that I realized certain messages were supposed to be warnings. The only indication on my computer is that the text for warning messages has a yellow-gray color, and error messages red.

Here is another example of one commenter from last month saying they didn't notice a warning:

You're right, I didn't notice the warning.

Some other disadvantages of only using color as an indicator are that--

  1. the colors might not work or display the same on everyone's computer,
  2. some people might not see colors well (e.g. color blindness) or interpret them the with the same meaning,
  3. it doesn't carry over when copying and pasting (e.g. to GitHub comments), and
  4. the color doesn't show up in log files.

There could be other scenarios.

Also, even when you can see the color, it can be unclear what is meant by the color (e.g. that yellow-gray is supposed to be a warning). Some applications use these same colors to mean different things. For example, on my machine the yellow-gray and red colors are also used by git for non-error formatting (e.g. git log headers).

I will post a PR for this shortly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: loggingInformation Loggingauto-lockedOutdated issues that have been locked by automationtype: enhancementImprovements to functionality

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions