NE: Log whether tunnel was activated from the app or not

Signed-off-by: Roopesh Chander <roop@roopc.net>
This commit is contained in:
Roopesh Chander 2018-12-19 16:26:28 +05:30
parent 35450bf407
commit 5c501ac9a6
1 changed files with 6 additions and 0 deletions

View File

@ -41,6 +41,12 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
let tunnelName = tunnelConfiguration.interface.name
wg_log(.info, message: "Starting tunnel '\(tunnelName)'")
if activationAttemptId != nil {
wg_log(.info, staticMessage: "Tunnel activated from the app")
} else {
wg_log(.info, staticMessage: "Tunnel not activated from the app")
}
let isActivateOnDemandEnabled = tunnelProviderProtocol.isActivateOnDemandEnabled
if isActivateOnDemandEnabled {
wg_log(.info, staticMessage: "Tunnel has Activate On Demand enabled")