My question is can I create a java microservice able to read all the logs of the others microservices?
The exact path of the logs of my 2 deployed microservices is this:
/app/ZZZ/dyn/clients/log/zzz_clients.log
/app/ZZZ/dyn/checkout/log/zzz_checkout.log
Is it possible to create a new spring boot logging microService which will be deployed to this exact path:
/app/ZZZ/dyn/logging/
able to read to logs file of the others 2 microservices?
To be clear the folders:
/app/ZZZ/dyn/clients/
/app/ZZZ/dyn/checkout/
/app/ZZZ/dyn/logging/
are the one containing the following folders/file:
/app/ZZZ/dyn/nameOfMicroservice
|_ BOOT-INF
|_ ZZZ_nameOfMicroservice.jar
|_ META-INF
|_ org
where nameOfMicroservice is the: clients, checkout, logging
I know how to read a file contained inside the project folder but how can I read files external to my logging service jar is deployed?
thanks
It is recommended implementing a centralized log storage and creating a separate logging service that receives log entries from different microservices and saves them in centralized storage.
Having centralized log storage simplifies logging, log retrieval, analytics, investigation, management and coordination of microservices log data.
Microservices logging best practices every team should know
What makes an effective microservices logging strategy?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With