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

Fix the JSON layout logging levels mapping #314

Merged
merged 4 commits into from
Feb 18, 2021
Merged

Fix the JSON layout logging levels mapping #314

merged 4 commits into from
Feb 18, 2021

Conversation

dzou
Copy link
Contributor

@dzou dzou commented Feb 16, 2021

Fix the Logback to Severity mapping in the StackdriverJsonLayout.

Fixes #299.

@dzou dzou requested a review from a team February 16, 2021 20:56
Copy link
Member

@meltsufin meltsufin left a comment

Choose a reason for hiding this comment

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

Optional: add more coverage for all logging levels, especially TRACE.

# Conflicts:
#	spring-cloud-gcp-logging/src/main/java/com/google/cloud/spring/logging/StackdriverJsonLayout.java
#	spring-cloud-gcp-logging/src/test/java/com/google/cloud/spring/logging/StackdriverJsonLayoutLoggerTests.java
@dzou
Copy link
Contributor Author

dzou commented Feb 18, 2021

I added the test testJsonSeverityLevelMapping() and ended up refactoring the test significantly. Should be easier to add tests in the future. Unfortunately there doesn't seem to be a way to trigger the DEFAULT via the logger for the unit test..

@sonarcloud
Copy link

sonarcloud bot commented Feb 18, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

Copy link
Member

@meltsufin meltsufin left a comment

Choose a reason for hiding this comment

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

Nice work!

@dzou dzou merged commit b875674 into main Feb 18, 2021
@dzou dzou deleted the fix-logging-levels branch February 18, 2021 15:05
dzou added a commit to spring-attic/spring-cloud-gcp that referenced this pull request Feb 23, 2021
kateryna216 added a commit to kateryna216/spring-cloud-gcp that referenced this pull request Oct 20, 2022
prash-mi pushed a commit that referenced this pull request Jun 20, 2023
Spring Data dialect updates:
* Many supporting classes moved from Spring Data into Spring Framework.
* Spring Boot integration is no longer in experimental; it's part of mainstream Boot autoconfiguration.
* The need for `SpannerBindMarkerFactoryProvider` is a bit redundant since the same information can be derived from dialect, which is already getting autodiscovered. But it's documented [here](https://docs.spring.io/spring-framework/docs/current/reference/html/data-access.html#r2dbc-DatabaseClient).

Updated sample:
* Explicitly specifying `@Column` is needed because v1 is case-sensitive. We have fixed it to comply with case-insensitive spec for v2 in #271 , so this should become unnecessary when we migrate to v2.

Necessary but not sufficient step towards #314.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Logging: warning level is incorrectly reported to Cloud Logging
3 participants