fix gen_logfun to work with multi-dimensional arrays
fix multi-dimensional array logging
fix reporting of primitive data