read with java a log file outside of the deployed jar folder

Viewed 111

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

1 Answers
Related