Add key length logging.