mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-27 00:05:25 +00:00
Overloading .debug/.error for ‘.logSecurityEvent’
Search/Replace Strategies: 1. Search regex: `SecureLogger\.logSecurityEvent\(\s*(.*?),\s*level:\s*\.(\w+)\s*\)` Replace regex: `SecureLogger.$2($1)` Sample input: `SecureLogger.logSecurityEvent(.authenticationFailed(peerID: peerID), level: .warning)` Sample output: `SecureLogger.warning(.authenticationFailed(peerID: peerID))` --- 2. Search regex: `SecureLogger\.logSecurityEvent\(\s*(.*?)\s*\)` Replace regex: `SecureLogger.info($1)` (`info` is the default level) Sample input: `SecureLogger.logSecurityEvent(.handshakeStarted(peerID: peerID))` Sample output: `SecureLogger.info(.handshakeStarted(peerID: peerID))`
This commit is contained in:
@@ -678,7 +678,7 @@ final class NoiseHandshakeState {
|
||||
let decrypted = try symmetricState.decryptAndHash(staticData)
|
||||
remoteStaticPublic = try NoiseHandshakeState.validatePublicKey(decrypted)
|
||||
} catch {
|
||||
SecureLogger.logSecurityEvent(.authenticationFailed(peerID: "Unknown - handshake"), level: .error)
|
||||
SecureLogger.error(.authenticationFailed(peerID: "Unknown - handshake"))
|
||||
throw NoiseError.authenticationFailure
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user