Redirect Cloud foundry streaming logs to a Virtual Machine

244 views Asked by At

I have a distributed cloud foundry setup on Azure.

To access the application logs I have to use cf logs <app-name>. Also I am able to see all cloud foundry logs using firehose plugin.

But all these logs are streaming logs.

Is there a way to redirect and store these logs to a different virtual machine outside cloud foundry setup?

I want to be able to access the logs later on to analyse in case something crashes or any error occurs.

So basically I want to store the cloud foundry streaming logs locally on a particular virtual machine. I don't want to use third party log management service.

1

There are 1 answers

4
nimeshjm On

You can create a user provided service that redirects all logs of an application to a syslog server. This setting is applied per application.

cf cups my-application-logger -l syslog://remote-machine-logger
cf bs my-application my-application-logger

Syslog in your 'remote-machine-logger' vm will have your application logs.