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

Adjust logging when running into Exceptions (exceptionCaught()) #140

Closed
mp911de opened this issue Sep 24, 2015 · 2 comments
Closed

Adjust logging when running into Exceptions (exceptionCaught()) #140

mp911de opened this issue Sep 24, 2015 · 2 comments
Labels
type: feature A new feature
Milestone

Comments

@mp911de
Copy link
Collaborator

mp911de commented Sep 24, 2015

When exception in the channel pipeline processing occurs, the exceptionCaught() method is called. Depending on the state (connected/disconnected, command in the queue) the exception is:

  1. Log it at debug level
  2. Passed to the first command in the queue and complete the command exceptionally
  3. If the connection is in disconnected state, the exception is stored and used for newly arrived commands to complete them exceptionally and return
  4. If the connection is in connected state, the exception is passed to the next handler that causes logging on WARN level

Change:

  1. Do not log the Exception at all if it was consumed/attached to a command
  2. Any not consumed exceptions are logged. If IOExceptions with the reasons (check for the correct text) connection reset by peer and connection timed out occur, log them on DEBUG level, everything else on WARN level

Reference: mp911de/spinach#12

@mp911de mp911de added the type: feature A new feature label Sep 24, 2015
@mp911de mp911de added this to the Lettuce 3.4 milestone Sep 24, 2015
@mp911de mp911de changed the title Adjust logging when running into Exceptions (exceptionCaught()) Adjust logging when running into Exceptions (exceptionCaught()) Sep 24, 2015
mp911de added a commit that referenced this issue Oct 1, 2015
- Log consumed exceptions at DEBUG level
consumed means either the exception was attached to a command or it was stored in the connection error field when disconnected
- Log timeout/connection reset/broken pipe IOExceptions on DEBUG level and log all other IOExceptions on INFO level
- Keep: Everything else is logged on WARN level
- Adopt log pattern/log behavior to write log listener
@mp911de
Copy link
Collaborator Author

mp911de commented Oct 1, 2015

Needs merge to 4.1

mp911de added a commit that referenced this issue Oct 3, 2015
- Log consumed exceptions at DEBUG level
consumed means either the exception was attached to a command or it was stored in the connection error field when disconnected
- Log timeout/connection reset/broken pipe IOExceptions on DEBUG level and log all other IOExceptions on INFO level
- Keep: Everything else is logged on WARN level
- Adopt log pattern/log behavior to write log listener
mp911de added a commit that referenced this issue Oct 8, 2015
- Log consumed exceptions at DEBUG level
consumed means either the exception was attached to a command or it was stored in the connection error field when disconnected
- Log timeout/connection reset/broken pipe IOExceptions on DEBUG level and log all other IOExceptions on INFO level
- Keep: Everything else is logged on WARN level
- Adopt log pattern/log behavior to write log listener
@mp911de
Copy link
Collaborator Author

mp911de commented Oct 8, 2015

Implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature A new feature
Projects
None yet
Development

No branches or pull requests

1 participant