Hiyve Components - v1.0.0
    Preparing search index...
    • Create a namespaced debug logger.

      Parameters

      • namespace: string

        The namespace for this logger (e.g., 'hiyve:client-provider')

      Returns DebugLogger

      A debug logger instance

      Creates a logger that prefixes all messages with the namespace. Logging is conditional based on the global debug configuration.

      Basic usage:

      import { createDebugLogger } from '@hiyve/utilities';

      const debug = createDebugLogger('hiyve:my-component');

      debug.log('Component mounted');
      debug.warn('Deprecated prop used');
      debug.error('Failed to load data', error);

      In a React component:

      import { createDebugLogger } from '@hiyve/utilities';

      const debug = createDebugLogger('hiyve:video-grid');

      function VideoGrid({ participants }) {
      useEffect(() => {
      debug.log('Participants updated:', participants.length);
      }, [participants]);

      // ...
      }