OpenTelemetry SDK
    Preparing search index...

    Function createLoggerConfigurator

    • Experimental

      Creates a LoggerConfigurator from an array of logger patterns. Patterns are evaluated in order, and the first matching pattern's config is used. Supports exact matching and simple wildcard patterns with '*'.

      The returned configurator computes a complete LoggerConfig by merging the matched pattern's config with default values for any unspecified properties.

      Parameters

      • patterns: LoggerPattern[]

        Array of logger patterns with their configurations

      Returns LoggerConfigurator

      A LoggerConfigurator function that computes complete LoggerConfig This feature is in development as per the OpenTelemetry specification.

      const configurator = createLoggerConfigurator([
      { pattern: 'debug-logger', config: { minimumSeverity: SeverityNumber.DEBUG } },
      { pattern: 'prod-*', config: { minimumSeverity: SeverityNumber.WARN } },
      { pattern: '*', config: { minimumSeverity: SeverityNumber.INFO } },
      ]);