cancel
Showing results for 
Search instead for 
Did you mean: 

How to log a Node.js app running on SAP BTP and SAP BAS

MikeB
Contributor
0 Kudos

I have a Node.js app running on SAP BTP. When I run it locally in my IDE, I can easily read the logs in console, but when I run the app in SAP BAS or deploy to SAP BTP, I can't figure out how to get the logs.

In the SAP BTP Cokpit's HTML5 Applications section, there is an option to view the Error Log, but it doesn't contain the error messages I raise with

console.error();

Is it possible to get the app logs inside of SAP BAS, running on SAP BTP?

Accepted Solutions (1)

Accepted Solutions (1)

gregorw
Active Contributor
cf logs <appname>
MikeB
Contributor
0 Kudos

Thanks!

P.S. To get the <appname> there is a need to run:

cf apps

this will return a name of the app's Node.js backend.

Answers (0)