Debugging OneSDK
Understanding the types of communication and errors you might see when running an application using OneSDK is key to maintaing a fast workflow with Superface.
Below is a list of all the debugging options available in OneSDK and what you can use each one for.
Using environment variables
You can set the debug level for OneSDK via your environment. There are two options and you can use one or both of them at the same time.
ONESDK_LOG
ONESDK_LOG=on # on, yes, true, 1
ONESDK_LOG
controls basic logging for OneSDK lifecycle and HTTP transactions logging.
Setting debug options at runtime
You can also pass these variables to your application at runtime. For example:
ONESDK_LOG=on node index.mjs
You can also provide this option when using the CLI during the execute
command:
ONESDK_LOG=on superface execute <provider-name> <scope/use-case>