Selva Compute API Reference - v1.1.2
    Preparing search index...

    Function setLogger

    • Set a custom logger instance

      Use this to configure custom logging behavior.

      Parameters

      • logger: Logger | Console | null

        Custom logger implementation or null to disable logging

      Returns void

      import { setLogger } from 'selva-compute';

      // Enable console logging
      setLogger(console);

      // Use a custom logger
      setLogger({
      debug: (msg, ...args) => myLogger.debug(msg, ...args),
      info: (msg, ...args) => myLogger.info(msg, ...args),
      warn: (msg, ...args) => myLogger.warn(msg, ...args),
      error: (msg, ...args) => myLogger.error(msg, ...args)
      });

      // Disable logging
      setLogger(null);