On Thu, Jun 12, 2025 at 05:54:01PM +0200, Olaf Hering wrote: > Tue, 15 Apr 2025 04:19:38 -0700 Shradha Gupta > <[email protected]>: > > > static int kvp_key_add_or_modify(int pool, const __u8 *key, int key_size, > > + if (debug) > > + syslog(LOG_DEBUG, "%s: got a KVP: pool=%d key=%s val=%s", > > + __func__, pool, key, value); > > > > if ((key_size > HV_KVP_EXCHANGE_MAX_KEY_SIZE) || > > - (value_size > HV_KVP_EXCHANGE_MAX_VALUE_SIZE)) > > + (value_size > HV_KVP_EXCHANGE_MAX_VALUE_SIZE)) { > > + syslog(LOG_ERR, "%s: Too long key or value: key=%s, val=%s", > > + __func__, key, value); > > + > > + if (debug) > > + syslog(LOG_DEBUG, "%s: Too long key or value: pool=%d, > > key=%s, val=%s", > > + __func__, pool, key, value); > > return 1; > > + } > > I think this is logging three times in case of an error. > Maybe move the debug case after the size check, and change the LOG_ERR case > to show all details just once? > > > Olaf
Thanks Olaf. That makes sense. Let me send out another patch to address this.
