docs: function toCleanSettingsOrOptions(optionsOrSettings) {
    if (!optionsOrSettings || typeof optionsOrSettings !== 'object') return undefined;
  
    const cleaned = optionsOrSettings ? copy(optionsOrSettings) : {};
  
    if (isValidLogLevel(cleaned.logLevel)) {
      cleaned.logLevel = cleanLogLevel(cleaned.logLevel);
    } else {
      delete cleaned.logLevel;
    }
    if (!isBoolean(cleaned.useLevelPrefixes)) {
      delete cleaned.useLevelPrefixes;
    }
    if (isNotBlank(cleaned.envLogLevelName)) {
      cleaned.envLogLevelName = cleaned.envLogLevelName.trim();
    } else {
      delete cleaned.envLogLevelName;
    }
    if (!isBoolean(cleaned.useConsoleTrace)) {
      delete cleaned.useConsoleTrace;
    }
    if (cleaned.underlyingLogger && !isMinimumViableLogger(cleaned.underlyingLogger)) {
      console.warn('Skipping configured underlying logger, since it is NOT a minimum viable logger');
      delete cleaned.underlyingLogger;
    }
    return cleaned;
  }