-
Notifications
You must be signed in to change notification settings - Fork 633
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
Make service error logging configurable #1307
Comments
Is this the same as #1091? |
Strange that this behavior seems to be different in the Java DSL and the Scala DSL:
Can we at least make these consistent and add |
@solarmosaic-kflorence that sounds reasonable to me, could you prepare a PR? |
@solarmosaic-kflorence not really. But I think that we can close this issue as a duplicate of #1091. |
@ihostage by "that" I meant my comment above #1307 (comment) |
Currently, there is a fixed set of exceptions that are not logged, another set that are logged as warnings, and everything else is logged as an error (see here). Our particular use-case is that we'd like to make client (4xx) errors like PolicyViolation or a 401 get logged at the info level rather than as errors, since we'd like to cut down on the number of errors we log, and these particular exceptions do not indicate a problem with our service.
More generally, though, it seems like it could be useful to allow users to control how their errors get logged.
I'm willing to make this change, but as I'm not real familiar with the Lagom codebase, I'd appreciate pointers on how best to do this, e.g. how to structure such a configuration, where to pass it in, etc.
In our case, it seems like being able to pass in a lambda that could look at the exception to see if it's a
TransportException
, and then use the error code to determine the log level, might be a good option.The text was updated successfully, but these errors were encountered: