Skip to content

Commit 6a15795

Browse files
committed
[DNM] Add some verbose logging
1 parent 376414f commit 6a15795

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

Sources/Build/LLBuildProgressTracker.swift

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -343,11 +343,11 @@ final class LLBuildProgressTracker: LLBuildBuildSystemDelegate, SwiftCompilerOut
343343
result: CommandExtendedResult
344344
) {
345345
// FIXME: This should really happen at the command-level and is just a stopgap measure.
346-
let shouldFilterOutput = !self.logLevel.isVerbose && command.verboseDescription.hasPrefix("codesign ") && result
347-
.result != .failed
346+
let shouldFilterOutput = !self.logLevel.isVerbose
348347
self.queue.async {
349348
if let buffer = self.nonSwiftMessageBuffers[command.name], !shouldFilterOutput {
350349
self.progressAnimation.clear()
350+
self.outputStream.send("EXTRA VERBOSE [\(result.pid?.description ?? "unknown PID")] \(command.verboseDescription): ")
351351
self.outputStream.send(buffer)
352352
self.outputStream.flush()
353353
self.nonSwiftMessageBuffers[command.name] = nil
@@ -628,8 +628,14 @@ extension SwiftCompilerMessage {
628628
fileprivate var verboseProgressText: String? {
629629
switch kind {
630630
case .began(let info):
631-
([info.commandExecutable] + info.commandArguments).joined(separator: " ")
632-
case .skipped, .finished, .abnormal, .signalled, .unparsableOutput:
631+
"EXTRA VERBOSE [\(info.pid)]: \(([info.commandExecutable] + info.commandArguments).joined(separator: " "))"
632+
case .finished(let info),
633+
.abnormal(let info),
634+
.signalled(let info):
635+
"EXTRA VERBOSE [\(info.pid)]: \(info.output ?? "no output")"
636+
case .unparsableOutput(let output):
637+
"EXTRA VERBOSE [unknown PID]: \(output)"
638+
case .skipped:
633639
nil
634640
}
635641
}

0 commit comments

Comments
 (0)