@unvired/turboforms-embed-sdk 2.0.79 → 2.0.80

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 CHANGED
@@ -654,6 +654,39 @@ loadForm({
654
654
  | 014 | Failed to validate attachments |
655
655
  | 015 | File not found in IndexedDB |
656
656
 
657
+ ## 🔍 Debugging & DevTools Logger Commands
658
+
659
+ The SDK includes a built-in logging system with custom styling and log filtering. By default, only errors (`error`) are logged to the browser console.
660
+
661
+ You can dynamically adjust the log level in the **Browser DevTools Console** using the global helper commands:
662
+
663
+ ### Enable All Logs
664
+ To view all SDK lifecycle, IndexedDB, rendering, and step events (`[TF_SDK:...]`):
665
+ ```javascript
666
+ setLogLevel("all");
667
+ // or
668
+ logger.setLevel("all");
669
+ ```
670
+
671
+ ### Filter by Specific Log Level
672
+ ```javascript
673
+ setLogLevel("info"); // Shows only info messages (lifecycle, file uploads, IndexedDB updates)
674
+ setLogLevel("warn"); // Shows only warning messages
675
+ setLogLevel("error"); // Shows only error messages (default level)
676
+ setLogLevel("debug"); // Shows only debug/trace messages
677
+ ```
678
+
679
+ ### Inspect the Logger Object
680
+ ```javascript
681
+ // Check logger methods & configuration
682
+ console.log(window.logger);
683
+
684
+ // Emit custom test log messages
685
+ logger.info("Custom info message");
686
+ logger.warn("Custom warning message");
687
+ logger.error("Custom error message");
688
+ ```
689
+
657
690
  ## 🔐 Security Considerations
658
691
 
659
692
  - Validate all form data before processing