I don't think so many recursive diag_log/logFormat calls is good for performance, neither is a growing RPT file.
Also it is the client writing to the servers RPT file, meaning each line represents network traffic.
Seems as if there is an object array being iterated through. Perhaps delete the null element from that array rather than log a report, or at least allow scripters the ability to switch off that diag_log/logFormat call to cut down on network traffic, RPT size, diag_log calls, and make the RPT more user-friendly.