Skip to content

Conversation

@dmoody256
Copy link
Contributor

I noticed in appveyor run in #4144, intermittentally the ninja tests will fail. Unfortunately the ninja daemon prints most of its info to a logfile and not stderr, so when looking at the logs in the CI its hard to see what went wrong.

This PR puts the error message to stderr as well as the logs.

Contributor Checklist:

  • I have created a new test or updated the unit tests to cover the new/changed functionality.
  • I have updated CHANGES.txt (and read the README.rst)
  • I have updated the appropriate documentation

@bdbaddog bdbaddog merged commit 57de0ae into SCons:master May 11, 2022
)

def log_error(msg):
logging.debug(msg)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. if it's an error, isn't logging.error more appropriate?
  2. I know it's possible to configure logging to go both places, but if it needs to be log-level-dependent which goes where, I know it's not all that simple (multiple loggers, inheritance, etc. - may not be worth it). The simple case is to just add stream=sys.stderr to the initialization in basicConfig.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. The logging levels are useful when the volume of logging is overwhelming. Currently (IMHO) the ninja daemon doesn't put out enough logging for the logging levels to really be useful. Not saying logging.error is not more appropriate or correct, just kind of meaningless in this context and use case. We can easily change it in the future it the logging become hard to manage.

  2. Maybe one day if the logging situation calls for it. For now I think this is fine.

@mwichmann mwichmann added this to the NextRelease milestone May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants