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

server: only log warning if grpcServer.Serve() returned an error. #2763

Merged
merged 1 commit into from
Jan 31, 2024

Commits on Jan 31, 2024

  1. server: only log warning if grpcServer.Serve() returned an error.

    Additionally change the `Key` to be the listener address, which is hopefully
    more useful than a difficult-to-decipher dump of the listener struct.
    
    The previous behavior would result in log lines like the following, even if
    nothing went wrong:
    ```
    time="2024-01-31T17:30:25Z" level=warning msg="accept failed" Error="<nil>" Key="&{0x140002e4000 {<nil> 0 0}}" Topic=grpc
    ```
    With this change, the message is only logged if there was an error, and it will look like this:
    ```
    time="2024-01-31T17:40:25Z" level=warning msg="accept failed" Error="lolol just testing" Key="127.0.0.1:59289" Topic=grpc
    ```
    saser committed Jan 31, 2024
    Configuration menu
    Copy the full SHA
    ce7e5d3 View commit details
    Browse the repository at this point in the history