3.0 moved Logger.error and Logger.warning to stderr via FileHandle.standardError.write. Two small problems with that choice:
- Ordering.
print writes to a block-buffered stdout when output is piped; FileHandle.write is unbuffered. Under 2>&1 — i.e. any CI log — warnings now appear before the "Report successfully created" line rather than interleaved where they belong.
- Crash on a closed descriptor.
FileHandle.write raises an uncatchable Objective-C exception, so xchtmlreport … 2>&- now crashes where it previously failed silently.
Task: use fputs(message + "\n", stderr) instead, which fixes both. Optionally fflush(stdout) before writing to stderr to keep interleaving exact.
Good first issue — a couple of lines in Logger.swift.
3.0 moved
Logger.errorandLogger.warningto stderr viaFileHandle.standardError.write. Two small problems with that choice:printwrites to a block-buffered stdout when output is piped;FileHandle.writeis unbuffered. Under2>&1— i.e. any CI log — warnings now appear before the "Report successfully created" line rather than interleaved where they belong.FileHandle.writeraises an uncatchable Objective-C exception, soxchtmlreport … 2>&-now crashes where it previously failed silently.Task: use
fputs(message + "\n", stderr)instead, which fixes both. Optionallyfflush(stdout)before writing to stderr to keep interleaving exact.Good first issue — a couple of lines in
Logger.swift.