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

[grpc_validator] Accept log as argument in the interceptor and log on failure #494

Closed
liadmord opened this issue May 25, 2022 · 4 comments
Closed

Comments

@liadmord
Copy link

No description provided.

@bwplotka
Copy link
Collaborator

Fair request, help wanted, PR welcome (to v2 branch).

@rohanraj7316
Copy link
Contributor

@bwplotka do you have any preference here regarding the logging prefix + error msg or error msg?

rohanraj7316 added a commit to rohanraj7316/go-grpc-middleware that referenced this issue Mar 21, 2023
used logging.Logger interface to
add error logging in validator
interceptor

addition: grpc-ecosystem#494
@bwplotka
Copy link
Collaborator

No strong opinion on that, but we need to improve validator API before v2, so if you could help with that, it would be fabulous 😱 (mentioned here)

rohanraj7316 added a commit to rohanraj7316/go-grpc-middleware that referenced this issue Mar 23, 2023
used logging.Logger interface to
add error logging in validator
interceptor

addition: grpc-ecosystem#494
bwplotka pushed a commit that referenced this issue Mar 26, 2023
* feat: add error logging in validator

used logging.Logger interface to
add error logging in validator
interceptor

addition: #494

* feat: update interceptor implementation

made fast fail and logger as optional args
addition to that instead of providing values
dynamically at the time of initialization made
it more dynamic

* fix: update options args

updated args based on review

* refactor: update validate func

restructured if statement  in-order to make code execution based on shouldFailFast flag more relevant.

* refactor: shifted interceptors into new file

restructured code in order to separate the
concern. ie: in terms of code struct and testcases wise.

* test: updated the testcases

modified testcases based on the current modifications made in the code base.

* fix: add copyright headers

* fix: update comment and code

updated code based on reviews
@bwplotka
Copy link
Collaborator

Fixed in #544

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

No branches or pull requests

3 participants