Web logging best practices
Last updated: October 28, 2024
This topic describes logging best practices and the happy path for the Web SDK.
Recommended logging
iProov recommends logging the following:
-
iProov success codes
-
iProov error codes
-
iProov failure codes
-
The
token
anduser_id
where appropriate -
Event states
-
Retry attempt number and retry state
-
Device model and OS
-
iProov SDK version
Events
The diagram below outlines the suggested event points and data to write to a logging system.
Enable debug logs
By default the logging level is set at INFO. Lower level logs can be exposed to the console by setting the debug option, see: https://github.com/iProov/web#debug-logs
For example: <iproov-me token="***YOUR_TOKEN_HERE***" debug="true"></iproov-me>
Warnings and errors are written to the console, see: https://github.com/iProov/web#support-checker
-
This setting has no effect on any
iProovSupport
instance that has been initialized separately to the main component. -
The checker accepts a logger argument that can be console or any common logging library. You can configure the logging library to meet your specific requirements.
Next step