For performance reasons, the
XML logger writes to the log file during a build and doesn't write the closing step, log, and build tags to the log file until the build completes, so to send the log file as a complete XML document, the file must be copied and those tags added to the file before sending. This can be accomplished with the
Transform XML Log action (see the
Logging.bld sample).