Skip to content

Use log level warning only for real warning #976

@Spacetown

Description

@Spacetown

How would this feature be useful?

If the python logger is configured to handle warnings in a special wa, e.g. to format them to be recognised by a CI pipeline execution, the following messages are cached as warnings but they are more like a info:

  1. The log entry if the session is started: nox > Running session lint
  2. The log entry if multiple sessions are executed: nox > Ran multiple sessions:

Describe the solution you'd like

There are several ways to solve the issue:

  1. Change the log function to use info. This would change the colour.
  2. Add a new log level SESSION_INFO like it's done for SUCCESS. Here the color can be configured

Describe alternatives you've considered

Ignore warnings issued by nox depending on the message text.
I think this is not a nice solution.

Anything else?

I tested solution 2 in my fork and it worked very well.

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