Examine Log Files
Here is an overview of the relevant log files when working with BaaS Services.
Client Log
The BaaS Extension client log contains the activity logged for the tool in Visual Studio Code. The Log is available in the BaaS Side Bar Service Explorer view under the service node Logs, listed as Client.
The command "F1 - BaaS: View Log" shows the log.
The severity level for the log entries is by default INFO.
It can be changed in BaaS Settings "F1 - BaaS: Open Settings".
The most verbose severity level is TRACE. It's required when creating a Support Zip file (see Support Zip chapter).
If the TRACE severity level is set; the latest payload and response zip files from such server requests are stored for debugging purposes.
To open the folder location for the latest payload/response zip files, use the command "F1 - BaaS: Open Latest Zip File Location".
Handlers Logs
The BaaS service handlers logs contain the activity for a deployed BaaS service stored per handler type. The logs are available in the BaaS Side Bar Service Explorer view under the node Logs, listed as handlers or the handlers search result. The severity level for the log entries is by default INFO.
The command "Set Service Log Level" affects the log severity level of all runtime handlers for a service. To change the log level for the service: Right-click the service name and select "Set Service Log Level" from the context-menu. Optionally, use the command "F1 - BaaS: Set Service Log Level".
- Clicking the Handlers node tries to fetch it from the tenant. If not connected, it opens the latest stored on the client.
- Clicking the Handlers search result shows the latest search made if it exists; otherwise, it suggests to run the search command.
Build Log
The BaaS build log contains the output from the latest build of the BaaS service. The latest log is available in the BaaS Side Bar Service Explorer view under the service node named logs, listed as Build.
Deploy Log
The BaaS deploy log contains the output from the latest deployment of the BaaS service. The latest log is available in the BaaS Side Bar Service Explorer view under the service node named logs, listed as Deploy.
Code Scan Log
The BaaS code scan log contains the output from the latest code scan of the BaaS service. The code scan log is available in the BaaS Side Bar Service Explorer view under the service node named logs, listed as Code Scan. The code scan log contains go-to links from each finding to the position in the source code for the finding.
Job Log
The Job Log captures the development and deployment operations for a BaaS service. Each entry in the job log represents execution of operations such as code scan, build, import and redeploy.
Each entry can have one or more action buttons to show additional related information:
- action button displays each step transition and status in the job.
- action button opens a relevant build or deploy log for the job.
The Deployed Services view in the BaaS Explorer contains both a global job log view, that displays jobs for all services in the environment, and a specific job log view within each service.
Audit Log
The Audit Log captures the development and deployment transactions for a BaaS service, and the user that initiated each operation. Each Job triggers an entry in the Audit log.
Each entry in the log represents a transaction for a service and includes the severity, the result, and the user who initiated the transaction. Each entry has an action button that shows a comparison view of the change, displaying the values before and after the transaction.
The Deployed Services view in the BaaS Explorer contains both a global audit log view, that displays activities for all services in the environment, and a specific audit log view within each service.
Execution Log
The execution log captures the runtime activities of a BaaS service.
Each entry in the log represents a trigger event on a service handler and shows the resource consumption.
The Deployed Services view in the BaaS Explorer contains both a top level execution log view within each service and an execution log per handler.
Each entry has an action button that opens the detail log for that handler.
The Deployed Services view in the BaaS Explorer contains both an execution log view per service and a specific execution log view for each service handler.
Viewing Handler Logs in Portal
The runtime log files for a service are also available in Portal, in the API Gateway>Backend As A Service. This is the recommended way to view logs in production environments. BaaS Extension in Visual Studio Code should not be connected to PROD tenants.