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

4 log full flow of all requests #45

Merged
merged 6 commits into from
Jun 27, 2022

Conversation

henrikprangelNG
Copy link
Contributor

@henrikprangelNG henrikprangelNG commented Jun 21, 2022

Add detailed logging to console & file.

  • logs output to console (requestContent and responseContent are disabled):
2022-06-21 12:29:17.742+03:00  INFO [9ec5153c8585c6df,9ec5153c8585c6df] --- [nio-8080-exec-1] e.b.ruuter.domain.ConfigurationInstance  : [ incoming.request] - - - - - Request received for configuration: get-message
2022-06-21 12:29:18.027+03:00  INFO [9ec5153c8585c6df,03f0c4f392719216] --- [nio-8080-exec-1] e.b.ruuter.domain.steps.http.HttpStep    : [         http.get] http://localhost:8081/healthz - - 200 283 Executed: get_message
2022-06-21 12:29:18.030+03:00  INFO [9ec5153c8585c6df,e57225a41b2cdf1e] --- [nio-8080-exec-1] e.b.r.domain.steps.ConfigurationStep     : [           assign] - - - - 0 Executed: assign_value
2022-06-21 12:29:18.793+03:00  INFO [9ec5153c8585c6df,4a7e067ca0b1b46c] --- [nio-8080-exec-1] e.b.r.domain.steps.ConfigurationStep     : [           return] - - - - 763 Executed: return_value
2022-06-21 12:29:18.793+03:00  INFO [9ec5153c8585c6df,9ec5153c8585c6df] --- [nio-8080-exec-1] e.b.ruuter.domain.ConfigurationInstance  : [incoming.response] - - - - - Request processed for configuration: get-message
  • logs output to file (requestContent and responseContent are disabled):
1655803757 0.0.1-SNAPSHOT  INFO 0:0:0:0:0:0:0:1 [ incoming.request] [9ec5153c8585c6df,9ec5153c8585c6df] - - - - - : Request received for configuration: get-message
1655803758 0.0.1-SNAPSHOT  INFO 0:0:0:0:0:0:0:1 [         http.get] [9ec5153c8585c6df,03f0c4f392719216] http://localhost:8081/healthz - - 200 283 : Executed: get_message
1655803758 0.0.1-SNAPSHOT  INFO 0:0:0:0:0:0:0:1 [           assign] [9ec5153c8585c6df,e57225a41b2cdf1e] - - - - 0 : Executed: assign_value
1655803758 0.0.1-SNAPSHOT  INFO 0:0:0:0:0:0:0:1 [           return] [9ec5153c8585c6df,4a7e067ca0b1b46c] - - - - 763 : Executed: return_value
1655803758 0.0.1-SNAPSHOT  INFO 0:0:0:0:0:0:0:1 [incoming.response] [9ec5153c8585c6df,9ec5153c8585c6df] - - - - - : Request processed for configuration: get-message

@henrikprangelNG henrikprangelNG linked an issue Jun 21, 2022 that may be closed by this pull request
Copy link
Contributor

@turnerrainer turnerrainer left a comment

Choose a reason for hiding this comment

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

In general, excellent job!

src/main/resources/application.yml Show resolved Hide resolved
@@ -1,2 +1,13 @@
application:
config-path: ${user.dir}/services
logging:
displayRequestContent: false
displayResponseContent: false
Copy link
Contributor

@turnerrainer turnerrainer Jun 21, 2022

Choose a reason for hiding this comment

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

Does current solution support displayResponseContent: true as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, both requestContent and responseContent are configurable, meaning when true, they are displayed in logs, and if false, they are not

src/main/resources/logback-spring.xml Outdated Show resolved Hide resolved
src/main/resources/logback-spring.xml Show resolved Hide resolved
@turnerrainer turnerrainer self-requested a review June 21, 2022 14:13
Copy link
Contributor

@turnerrainer turnerrainer left a comment

Choose a reason for hiding this comment

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

Just some minor changes needed.

Copy link
Contributor

@turnerrainer turnerrainer left a comment

Choose a reason for hiding this comment

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

Requested changes applied

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.

Log full flow of all requests
3 participants