sasjs / adapter

An adapter for bidirectional SAS® <-> Javascript communication
https://adapter.sasjs.io
MIT License
39 stars 3 forks source link

on startup the serverType value should be written to the log #54

Closed allanbowe closed 3 years ago

allanbowe commented 4 years ago

I was just debugging an app configured for SAS9 that was calling Viya

Turned out the serverType was defined as servertype

We should write message to the log on adapter instantiation to display key values (such as servertype, serverUrl etc) for faster debugging, eg:

The SASjs Adapter has been instantiated!  The following default values are set:
  serverUrl:
  serverType:
  debug:
  (if Viya we can show the extra variables)
To override the defaults, simply pass an updated config in the request method.
krishna-acondy commented 4 years ago

@allanbowe Should we only do this if debug is true?

allanbowe commented 3 years ago

I'd say no - this will typically happen only once (on app startup) and the fact that debug is not set can be the cause of some issues

allanbowe commented 3 years ago

Closing this - now we use the adapter extensively in the CLI, where it is instantiated with each request, to add this would result in too much logging