@regulaforensics/vp-frontend-document-components 7.2.1606 → 7.2.1608-nightly
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -1
- package/dist/main.js +1 -1
- package/esm/main.js +1 -1
- package/lib/index.d.ts +6 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1405,6 +1405,10 @@ The Document Reader web components are also available on <a href="https://storyb
|
|
|
1405
1405
|
Logging can be helpful when you run into any issues.
|
|
1406
1406
|
Logs contain information about how you use our products. That data helps Regula stuff to analyze and troubleshoot the cases you may experience.
|
|
1407
1407
|
|
|
1408
|
+
There are two ways to output logs: console or function callback.
|
|
1409
|
+
|
|
1410
|
+
#### Console
|
|
1411
|
+
|
|
1408
1412
|
To initiate the process of logs collecting:
|
|
1409
1413
|
|
|
1410
1414
|
**1.** Open the Developer menu in your browser.
|
|
@@ -1419,7 +1423,7 @@ localStorage.logger = 'main,wasm>console'
|
|
|
1419
1423
|
|
|
1420
1424
|
**4.** Reload the page.
|
|
1421
1425
|
|
|
1422
|
-
**5.** Add the `log` setting to the `processParam
|
|
1426
|
+
**5.** Add the `log` setting to the `processParam` if you want to see logs from WASM:
|
|
1423
1427
|
|
|
1424
1428
|
```json
|
|
1425
1429
|
{
|
|
@@ -1430,3 +1434,31 @@ localStorage.logger = 'main,wasm>console'
|
|
|
1430
1434
|
```
|
|
1431
1435
|
|
|
1432
1436
|
**6.** Start image processing. Logs will be displayed in Console.
|
|
1437
|
+
|
|
1438
|
+
#### Function callback
|
|
1439
|
+
|
|
1440
|
+
**1.** Import logging service from library.
|
|
1441
|
+
|
|
1442
|
+
```javascript
|
|
1443
|
+
import { Logger } from '@regulaforensics/vp-frontend-document-components';
|
|
1444
|
+
```
|
|
1445
|
+
|
|
1446
|
+
**2.** Set the callback function.
|
|
1447
|
+
|
|
1448
|
+
```javascript
|
|
1449
|
+
Logger.logListener = (log) => {
|
|
1450
|
+
// ...
|
|
1451
|
+
// do something with log
|
|
1452
|
+
// ...
|
|
1453
|
+
};
|
|
1454
|
+
```
|
|
1455
|
+
|
|
1456
|
+
**3.** Add the `log` setting to the `processParam` if you want to see logs from WASM:
|
|
1457
|
+
|
|
1458
|
+
```json
|
|
1459
|
+
{
|
|
1460
|
+
"processParam": {
|
|
1461
|
+
"log": true
|
|
1462
|
+
}
|
|
1463
|
+
}
|
|
1464
|
+
```
|