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

Reduce logging to the minimum required for operation #76

Merged
merged 1 commit into from
Jul 31, 2024

Conversation

CodeDrivenMitch
Copy link
Collaborator

@CodeDrivenMitch CodeDrivenMitch commented Jul 30, 2024

The rest of the log lines are reduced to debug, so that users can debug their connection if needed. For normal operation, this is not needed.

From now on, we will log:

  • Upon connection it will log it's connected and the settings retrieved
  • When the connection has been lost
  • upon the 5th failure of connection, it will log the connection error once. This is after about 30 seconds.

That's it. We don't want to spam the logs of the users when we deploy. The log during deployments is thus reduced to:

Connection to AxonIQ Console set up successfully! Settings: ClientSettingsV2(heartbeatInterval=10000, hear...
This application has lost it's connection to AxonIQ Console. Reconnection will be automatically attempted.
Connection to AxonIQ Console set up successfully! Settings: ClientSettingsV2(heartbeatInterval=10000, hear...

When we are offline, it will be similar to:

Connection to AxonIQ Console set up successfully! Settings: ClientSettingsV2(heartbeatInterval=10000, heartbeatTimeout=30000, processorReportInterval=2000, handlerReportInte
This application has lost it's connection to AxonIQ Console. Reconnection will be automatically attempted.
Failed to connect to AxonIQ Console. Error: io.netty.channel.AbstractChannel$AnnotatedConnectException: finishConnect(..) failed: Connection refused: localhost/127.0.0.1:700

The rest of the log lines are reduced to debug, so that users can debug their connection if needed. For normal operation, this is not needed.

From now on, we will log:
- Upon connection it will log it's connected and the settings retrieved
- upon the 5th failure of connection, it will log the connection error once

That's it. We don't want to spam the logs of the users when we deploy. The log during deployments is thus reduced to:

```
Connection to AxonIQ Console set up successfully! Settings: ClientSettingsV2(heartbeatInterval=10000, hear...
This application has lost it's connection to AxonIQ Console. Reconnection will be automatically attempted.
Connection to AxonIQ Console set up successfully! Settings: ClientSettingsV2(heartbeatInterval=10000, hear...
```

When we are offline, it will be similar to:
```
Connection to AxonIQ Console set up successfully! Settings: ClientSettingsV2(heartbeatInterval=10000, heartbeatTimeout=30000, processorReportInterval=2000, handlerReportInte
This application has lost it's connection to AxonIQ Console. Reconnection will be automatically attempted.
Failed to connect to AxonIQ Console. Error: io.netty.channel.AbstractChannel$AnnotatedConnectException: finishConnect(..) failed: Connection refused: localhost/127.0.0.1:700
```
Copy link

sonarcloud bot commented Jul 30, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
9.3% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

Copy link
Contributor

@smcvb smcvb left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

@CodeDrivenMitch CodeDrivenMitch merged commit f3696ef into main Jul 31, 2024
6 of 8 checks passed
@CodeDrivenMitch CodeDrivenMitch deleted the feature/less-logging branch July 31, 2024 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants