Applying logs to gRPC
In software development, logging is a very important concept. Not only will it allow you to identify problems while you are developing your application, but it will also allow you to monitor an application that has been released into production. If anything happens to the application, you would be able to have a look in the logs to see what the application was doing and whether it produced any errors.
There are many different types of logs. You can write the log messages to the console, as we did. You can write them to a file. You can write them to Azure Blob Storage somewhere in the cloud. You can select whichever method suits you best.
In ASP.NET Core applications, it's good practice to use dependency injection for logging, just as you would for other service types. The places in your code that write messages to the log would call relevant methods on the logger interface. And it's up to you to configure what exact implementation of that interface...