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

Make service error logging configurable #1307

Open
smagidson opened this issue Apr 9, 2018 · 7 comments
Open

Make service error logging configurable #1307

smagidson opened this issue Apr 9, 2018 · 7 comments

Comments

@smagidson
Copy link

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.

@TimMoore
Copy link
Contributor

Is this the same as #1091?

@ignasi35
Copy link
Contributor

I think this is also similar to #1375 (currently PR'd in #1398)

@solarmosaic-kflorence
Copy link

@raboof
Copy link
Contributor

raboof commented Mar 20, 2020

@solarmosaic-kflorence that sounds reasonable to me, could you prepare a PR?

@solarmosaic-kflorence
Copy link

@raboof looks like that landed in #2796

@ihostage
Copy link
Contributor

@solarmosaic-kflorence not really. But I think that we can close this issue as a duplicate of #1091.

@solarmosaic-kflorence
Copy link

@ihostage by "that" I meant my comment above #1307 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

7 participants