Skip to content

Commit

Permalink
last changes
Browse files Browse the repository at this point in the history
  • Loading branch information
federicocappelli committed Oct 22, 2024
1 parent 30f1356 commit f2961ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,18 @@ public actor NetworkProtectionServerStatusMonitor {
// MARK: - Start/Stop monitoring

public func start(serverName: String, callback: @escaping (ServerStatusResult) -> Void) {
Logger.networkProtectionServerStatusMonitor.debug("⚫️ Starting server status monitor for \(serverName, privacy: .public)")
Logger.networkProtectionServerStatusMonitor.log("⚫️ Starting server status monitor for \(serverName, privacy: .public)")

task = Task.periodic(delay: Self.monitoringInterval, interval: Self.monitoringInterval) {
let result = await self.checkServerStatus(for: serverName)

switch result {
case .success(let serverStatus):
if serverStatus.shouldMigrate {
Logger.networkProtectionMemory.debug("⚫️ Initiating server migration away from \(serverName, privacy: .public)")
Logger.networkProtectionMemory.log("⚫️ Initiating server migration away from \(serverName, privacy: .public)")
callback(.serverMigrationRequested)
} else {
Logger.networkProtectionMemory.debug("⚫️ No migration requested for \(serverName, privacy: .public)")
Logger.networkProtectionMemory.log("⚫️ No migration requested for \(serverName, privacy: .public)")
}
case .failure(let error):
Logger.networkProtectionMemory.error("⚫️ Error retrieving server status: \(error.localizedDescription, privacy: .public)")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public final class NetworkProtectionKeychainKeyStore: NetworkProtectionKeyStore
// MARK: - NetworkProtectionKeyStore

public func currentKeyPair() -> KeyPair? {
Logger.networkProtectionKeyManagement.debug("Querying the current key pair (publicKey: \(String(describing: self.currentPublicKey), privacy: .public), expirationDate: \(String(describing: self.currentExpirationDate), privacy: .public))")
Logger.networkProtectionKeyManagement.log("Querying the current key pair (publicKey: \(String(describing: self.currentPublicKey), privacy: .public), expirationDate: \(String(describing: self.currentExpirationDate), privacy: .public))")

guard let currentPrivateKey = currentPrivateKey else {
Logger.networkProtectionKeyManagement.log("There's no current private key.")
Expand Down

0 comments on commit f2961ef

Please sign in to comment.