SAP / open-ux-tools

Enable community collaboration to jointly promote and facilitate best in class tooling capabilities
Apache License 2.0
83 stars 41 forks source link

TBI - Add debug log for axios-extension #864

Closed slin-sap closed 1 year ago

slin-sap commented 1 year ago

Description (include screenshots)

axios does not have default integration with the popular debug module. E.g. if I run the odata-cli example in axios-extension with DEBUG environment variable set DEBUG=axios pnpm start abap, there is no log messages from axios module.

DEBUG=follow-redirects pnpm start abap provides http requests only from the axios' dependent follow-redirects module. It is not sufficient since there is no log for http response.

Value

It will be useful to enable console log to see the details http request and response data during debug and support.

Architecture Elaboration

Does it requires architecture elaboration?

  1. Options are: either using debug npm module directly or use axios-debug-log

  2. What log message format to agree on?

I would propose a one line summary followed by detailed full request/response stringified AxiosRequest and AxiosResponse. One line summary look like the following (the axios prefix is added by integrating debug / axios-debug-log):

Request: axios: axios:

Response: axios: axios:

  1. Handling sensitive data in response message Shall we consider adding a separate environment variable to show detailed AxiosResponse object string (e.g. DEBUG_SENSITIVE=axios)? And for DEBUG=axios we only show the summary.

Notes

Tasks

slin-sap commented 1 year ago

@ullasholla

tobiasqueck commented 1 year ago

@slin-sap is this done or anything else needed?

slin-sap commented 1 year ago

This has been completed thus closing the story.