Skip to content

chore: manage mutagen daemon lifecycle #98

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Mar 12, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
log privacy
  • Loading branch information
ethanndickson committed Mar 12, 2025
commit f2fc365ae5b07682265f8630ca6fd75609d77135
11 changes: 8 additions & 3 deletions Coder Desktop/VPNLib/FileSync/FileSyncDaemon.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class MutagenDaemon: FileSyncDaemon {

@Published public var state: DaemonState = .stopped {
didSet {
logger.info("daemon state changed: \(self.state.description)")
logger.info("daemon state changed: \(self.state.description, privacy: .public)")
}
}

Expand Down Expand Up @@ -72,7 +72,12 @@ public class MutagenDaemon: FileSyncDaemon {
}

state = .running
logger.info("mutagen daemon started, pid: \(self.mutagenProcess?.processIdentifier.description ?? "unknown")")
logger.info(
"""
mutagen daemon started, pid:
\(self.mutagenProcess?.processIdentifier.description ?? "unknown", privacy: .public)
"""
)
}

private func connect() async throws(DaemonError) {
Expand Down Expand Up @@ -164,7 +169,7 @@ public class MutagenDaemon: FileSyncDaemon {

private nonisolated func logOutput(pipe: FileHandle) {
if let line = String(data: pipe.availableData, encoding: .utf8), line != "" {
logger.info("\(line)")
logger.info("\(line, privacy: .public)")
}
}
}
Expand Down