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

This commit is contained in:
Roopesh Chander 2018-12-19 16:26:28 +05:30
parent 8f46713b0d
commit d36b764e20
1 changed files with 6 additions and 0 deletions

View File

@ -41,6 +41,12 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
let tunnelName = tunnelConfiguration.interface.name let tunnelName = tunnelConfiguration.interface.name
wg_log(.info, message: "Starting tunnel '\(tunnelName)'") 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 let isActivateOnDemandEnabled = tunnelProviderProtocol.isActivateOnDemandEnabled
if isActivateOnDemandEnabled { if isActivateOnDemandEnabled {
wg_log(.info, staticMessage: "Tunnel has Activate On Demand enabled") wg_log(.info, staticMessage: "Tunnel has Activate On Demand enabled")