Explore the categorized logging system with runtime controls
Enable and disable logging at runtime. Watch the console as you interact with the multiselect.
Enable logging for specific categories only. This example has async search enabled - type to see DATA logs. Try enabling different categories to see different types of logs.
Show popular items initially, then switch to web service search. Demonstrates beforeSearchCallback for accent removal.
Here's how to control logging programmatically:
// Import logging utilities
import { enableLogging, setLogLevel, setCategoryLevel, disableLogging }
from '@keenmate/web-multiselect';
// Enable all logging at debug level
enableLogging();
// Set specific log level for all categories
setLogLevel('info'); // 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent'
// Enable/disable specific categories
disableLogging(); // First disable all
setCategoryLevel('UI', 'debug'); // Debug only UI operations
setCategoryLevel('DATA', 'info'); // Info level for data operations
setCategoryLevel('INTERACTION', 'silent'); // Disable interaction logs
// Disable all logging (default for production)
disableLogging();