def safe_value(name, value):
 if (name.lower() in LOGGER_SENSITIVE_HEADERS):
  prefix_length = logger_settings.get('reveal_sensitive_prefix', 16)
  prefix_length = int(min(prefix_length, ((len(value) ** 2) / 32), (len(value) / 2)))
  redacted_value = value[0:prefix_length]
  return (redacted_value + '...')
 return value

def safe_value ( name , value ) : if ( name . lower ( ) in LOGGER_SENSITIVE_HEADERS ) : prefix_length = logger_settings . get ( 'reveal_sensitive_prefix' , 16 ) prefix_length = int ( min ( prefix_length , ( ( len ( value ) ** 2 ) / 32 ) , ( len ( value ) / 2 ) ) ) redacted_value = value [ 0 : prefix_length ] return ( redacted_value + '...' ) return value
only show up to logger_settings[reveal_sensitive_prefix] characters from a sensitive header .