Logging via the terminal
Considering our system has multiple servers, and these servers might be running by themselves, or all compiled into one binary in the ingress. Considering the flexibility of our system, we must define a logger in one place, and import this logger into any service that wants to log anything. We can supply all our servers with a logger via the glue
workspace with the following directory layout:
├── Cargo.toml
└── src
├── errors.rs
├── lib.rs
├── logger
│ ├── logger.rs
│ ├── mod.rs
│ └── network_wrappers
│ ├── actix_web.rs
│ └── mod.rs
└── token.rs
To integrate our logger, we must carry out the following steps:
Define a logger
Create a logging middleware...