Skip to content

Commit dc64983

Browse files
committed
Reduce logging of drained text in process classes
Commented out verbose log statements for drained text in ProcessCommand, ProcessRsyncOpenrsync, and ProcessRsyncVer3x to reduce log output and improve readability. Updated other log messages in ProcessCommand to use the correct class name.
1 parent c9cf303 commit dc64983

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

RsyncUI/Model/Process/Main/ProcessCommand.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,23 +56,23 @@ final class ProcessCommand {
5656

5757
sequenceTerminationTask = Task {
5858
for await _ in sequencetermination {
59-
Logger.process.info("ProcessRsyncVer3x: Process terminated - starting potensial drain")
59+
Logger.process.info("ProcessCommand: Process terminated - starting potensial drain")
6060
sequenceFileHandlerTask?.cancel()
6161
try? await Task.sleep(nanoseconds: 50_000_000)
6262
var totalDrained = 0
6363
while true {
6464
let data: Data = pipe.fileHandleForReading.availableData
6565
if data.isEmpty {
66-
Logger.process.info("ProcessRsyncVer3x: Drain complete - \(totalDrained) bytes total")
66+
Logger.process.info("ProcessCommand: Drain complete - \(totalDrained) bytes total")
6767
break
6868
}
6969

7070
totalDrained += data.count
71-
Logger.process.info("ProcessRsyncVer3x: Draining \(data.count) bytes")
71+
Logger.process.info("ProcessCommand: Draining \(data.count) bytes")
7272

7373
// IMPORTANT: Actually process the drained data
7474
if let text = String(data: data, encoding: .utf8) {
75-
Logger.process.info("ProcessRsyncVer3x: Drained text: \(text)")
75+
// Logger.process.info("ProcessRsyncVer3x: Drained text: \(text)")
7676
self.output.append(text)
7777
}
7878
}

RsyncUI/Model/Process/Main/ProcessRsyncOpenrsync.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ final class ProcessRsyncOpenrsync {
8383

8484
// IMPORTANT: Actually process the drained data
8585
if let text = String(data: data, encoding: .utf8) {
86-
Logger.process.info("ProcessRsyncOpenrsync: Drained text: \(text)")
86+
// Logger.process.info("ProcessRsyncOpenrsync: Drained text: \(text)")
8787
self.output.append(text)
8888
}
8989
}

RsyncUI/Model/Process/Main/ProcessRsyncVer3x.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ final class ProcessRsyncVer3x {
9898

9999
// IMPORTANT: Actually process the drained data
100100
if let text = String(data: data, encoding: .utf8) {
101-
Logger.process.info("ProcessRsyncVer3x: Drained text: \(text)")
101+
// Logger.process.info("ProcessRsyncVer3x: Drained text: \(text)")
102102
self.output.append(text)
103103
}
104104
}

0 commit comments

Comments
 (0)