Spring Cloud Services for Cloud Foundry provides access to the logs generated by each service instance, including logs for the backing apps (Spring Cloud Config server app or Spring Cloud Netflix Eureka app) for each instance. You can view these logs using the Service Instance Logging cf CLI plugin.
Support for the Service Instance Logging cf CLI plugin was added in Spring Cloud Services for Cloud Foundry v3.1.12.
Using the cf CLI plugin
After installing the Service instance logging cf CLI plugin (see the instructions in the Installing section of the plugin README), you can use the service-logs
command to tail logs or dump recent logs for a service instance.
To tail logs for a service instance, run cf service-logs SERVICE_NAME
, where SERVICE_NAME
is the name of the service instance:
$ cf service-logs my-config-server
To dump recent logs for the instance, use the --recent
flag:
$ cf service-logs --recent my-config-server
If your Tanzu Platform for Cloud Foundry deployment uses a self-signed certificate, you must use the --skip-ssl-validation
flag to deactivate the default validation of the platform’s SSL certificate:
$ cf service-logs --skip-ssl-validation my-config-server
Content feedback and comments