Skip to content

INF-59 - Set appropriate logging configuration#19

Merged
nickpalladino merged 3 commits intodevelopfrom
feature/INF-59
Jun 2, 2020
Merged

INF-59 - Set appropriate logging configuration#19
nickpalladino merged 3 commits intodevelopfrom
feature/INF-59

Conversation

@nickpalladino
Copy link
Member

Changes

  • Added logger config for org.breedinginsight
    • Logging for our application code can now be controlled independently from framework logging

Test Cases

Disable all framework logging and only see breeding insight logging

  • In bi-api/src/main/resources/logback.xml, set root level="OFF"
  • Keep org.breedinginsight logger level as INFO
  • Start bi-api
  • Cause an application logging event to be generated in org.breedinginsight
    • I sent a GET http://localhost:8081/v1/users/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa
      • This will attempt to get a user that doesn't exist and cause a logging event
  • Verify that you see only the UserController log message and no framework log messages in stdout

Disable breeding insight logging and see only framework logging

  • In bi-api/src/main/resources/logback.xml, set root level="INFO"
  • Set org.breedinginsight logger level as OFF
  • Start bi-api
  • Cause an application logging event to be generated in org.breedinginsight
    • I sent a GET http://localhost:8081/v1/users/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa
      • This will attempt to get a user that doesn't exist
  • Verify that you see only the framework log messages and no UserController log message in stdout

Acceptance Criteria

  • Verify test cases pass and functionality is as expected

@nickpalladino
Copy link
Member Author

</appender>

<root level="info">
<logger name="org.breedinginsight" level="INFO"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we have the different levels of the debugger here? error, debug, info? The logs look the same as they did before, not a bad thing though. Not sure if they were supposed to look different?

Copy link
Member

Choose a reason for hiding this comment

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

I'd recommend that we have our code be at DEBUG level, and all others (which would fall to the root level) be INFO.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds good. Changed org.breedinginsight logger level to DEBUG and pushed changes.

Copy link
Contributor

@ctucker3 ctucker3 left a comment

Choose a reason for hiding this comment

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

Looking for clarification on card purpose. Might be that @timparsons will want to get in on this discussion.

Copy link
Contributor

@ctucker3 ctucker3 left a comment

Choose a reason for hiding this comment

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

Chatted with Nick and saw the error of my ways. Everything looks good!

Copy link
Member

@timparsons timparsons left a comment

Choose a reason for hiding this comment

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

Forgot to have my comment be as part of an official review...see my comment in logback.xml

@nickpalladino nickpalladino merged commit b75d508 into develop Jun 2, 2020
@nickpalladino nickpalladino deleted the feature/INF-59 branch June 2, 2020 14:45
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