Using the Yarn logs CLI for containers that have zero length files produces output similar to this:
Note that stderr and prelaunch.err are both zero length files. Though the output is not misleading, the header is missing.
I suggest to add the header for zero length files as well, primarily for the following reasons:
- for applications having multiple files with the same name you may want to distinguish them by host - if many of those are of zero length, you can not extract this information from here. Note that this is a common case for stderr and prelaunch.err.
- you may want to see the modification time (which corresponds to the creation time of the zero length file)
- would explicitly display the "LogLength:0" line, which would avoid any confusion from end user side.