Microservices work in the real world, which is dynamic. To be useful, they have to be configurable, so that you can change an address or port to bind the server's socket. Often, you will need to set tokens, secrets, and the addresses of other microservices. Even if you have configured them correctly, your microservices may fail. In this case, you need to be able to use the server's logs.
In this chapter, we'll learn the following skills:
- How to use logging with the log crate
- How to read command-line parameters with the clap crate
- How to read environment variables with the dotenv crate
- How to declare and use configuration files