grpc / grpc-dotnet

gRPC for .NET
Apache License 2.0
4.22k stars 777 forks source link

Update logging to use generated logs #2531

Closed wabalubdub closed 2 months ago

wabalubdub commented 2 months ago

This PR uses the generated logs feature to simplify and reduce the log declarations.

closes #2529

Also my first PR so feedback would be lovely.

linux-foundation-easycla[bot] commented 2 months ago

CLA Signed

The committers listed above are authorized under a signed CLA.

JamesNK commented 2 months ago

Hi, thanks for the PR.

FYI this is just one file of many with logs. See https://github.com/search?q=repo%3Agrpc%2Fgrpc-dotnet+LoggerMessage.Define&type=code

You're welcome to update more if you'd like or stick with this one. I'll close the issue once all are updated.

wabalubdub commented 2 months ago

Hey, of course! I ordered the methods according to Event ID. I didn't notice there were more, ill work on the rest of them. would you rather i update the rest of the in this PR? I can probably get to all of them tomorrow.

JamesNK commented 2 months ago

One pr is fine

wabalubdub commented 2 months ago

Hey I updated the PR to include changes to all the files that have the LoggerMessage.Define syntax.

A couple notes:

JamesNK commented 2 months ago

Thanks! Looks good to me. There are a lot of changes so I haven't excuasively checked every log, but the ones I did look at were correct.