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

--[BE Week] Minimize logging spam #2140

Merged
merged 10 commits into from
Jun 28, 2023
Merged

--[BE Week] Minimize logging spam #2140

merged 10 commits into from
Jun 28, 2023

Conversation

jturner65
Copy link
Contributor

@jturner65 jturner65 commented Jun 27, 2023

Motivation and Context

The default logging behavior in habitat-sim has been overwhelming for some time now. So much debug information is displayed to the console that any important warnings or errors get lost in the noise. This PR is intended to address this issue.

Habitat-sim supports 4 logging levels : VERY_VERBOSE, DEBUG, WARNING and ERROR. The intended purpose of these logging level messages is as follows :

  • ERROR means some action or process has failed that the user needs to be aware of.
  • WARNING means that although a process didn't outright fail, it may be yielding an unexpected/inappropriate result that the user should take note of.
  • DEBUG means "here's the result of a process"
  • VERY_VERBOSE means "here's the result of a process with in-depth explanation".

This PR is geared toward making adjustments to the logging behavior of habitat-sim in order to make console output less overwhelming and more useful. The main changes are as follows :

  1. Currently Habitat-Sim sets the logging level by default to be DEBUG. This level is inappropriate for general use of the simulator, and is the primary culprit for information overload. This PR sets the default logging level to WARNING instead.
  2. Many messages in the assets, physics and metadata subsystems got demoted from warning to debug.

NOTE : Users can still modify their logging level to get more or fewer messages from the simulator by following the guidelines on this page.

To give an idea of the changes in this PR, before this PR's changes, loading a Floorplanner scene would yield over 45k messages to the console. With the changes in this PR, loading the same scene now prints 4 messasges. Note : all of the information -can- still be printed to the console if desired (if hunting down a bug, for instance) but the user would have to specify a more verbose logging level as in the instructions here.

How Has This Been Tested

C++ and python tests pass. The logging test needed to be slightly modified.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have completed my CLA (see CONTRIBUTING)
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Jun 27, 2023
@0mdc
Copy link
Contributor

0mdc commented Jun 27, 2023

Awesome! Thanks for tackling this!

Copy link
Contributor

@eundersander eundersander left a comment

Choose a reason for hiding this comment

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

LGTM!

* shows things that are generally useful. These names exist such that logging
* levels can be added and removed without users needed to change what they set
* logging to.
* The convience levels, @ref Verbose, @ref Default and @ref Quiet are the primary user facing
Copy link
Contributor

Choose a reason for hiding this comment

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

*convenience

Copy link
Contributor

@0mdc 0mdc left a comment

Choose a reason for hiding this comment

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

LGTM!

@jturner65 jturner65 marked this pull request as ready for review June 28, 2023 14:31
@jturner65 jturner65 changed the title --[WIP][BE Week] Minimize logging spam --[BE Week] Minimize logging spam Jun 28, 2023
In decreasing severity order : 'Error', 'Warning', 'Debug', 'Message'(for very verbose)
@jturner65 jturner65 merged commit c0dbf4c into main Jun 28, 2023
9 of 10 checks passed
@jturner65 jturner65 deleted the BE_LoggingSpam branch June 28, 2023 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants