🕓 10 minutes
Before being able to see logs in Kibana, the service application-logs
must be bound to the app.
Let's use the CLI to create and bind a service instance to our application.
cf marketplace
cf create-service application-logs lite myapplogs
cf services
cf bind-service cf-nodejs myapplogs
cf restage cf-nodejs
Let's then use the cockpit for checking logs.
- In the Application Overview page, choose Logs.
🎯 Result: The logs for the application appears. For analysis of logs, you can choose Open Log Analysis. You can also download the logs to your local system.
- Enter the command
cf logs {app_name}
. This command generates real-time log streams. Initiate an activity to view logs. To exit real-time stream, use Ctrl+C.
- To view the most recent logs, enter the command,
cf logs {app_name} --recent
.