Merge branch 'refine-some-logging'

This commit is contained in:
Davide De Rosa 2018-09-28 08:44:04 +02:00
commit b1ed8e8671
2 changed files with 4 additions and 4 deletions

View File

@ -526,12 +526,12 @@ extension TunnelKitProvider {
}
log.info("\tMTU: \(mtu)")
log.info("\tCompression framing: \(compressionFraming)")
if let keepAliveSeconds = keepAliveSeconds {
if let keepAliveSeconds = keepAliveSeconds, keepAliveSeconds > 0 {
log.info("\tKeep-alive: \(keepAliveSeconds) seconds")
} else {
log.info("\tKeep-alive: default")
log.info("\tKeep-alive: never")
}
if let renegotiatesAfterSeconds = renegotiatesAfterSeconds {
if let renegotiatesAfterSeconds = renegotiatesAfterSeconds, renegotiatesAfterSeconds > 0 {
log.info("\tRenegotiation: \(renegotiatesAfterSeconds) seconds")
} else {
log.info("\tRenegotiation: never")

View File

@ -902,7 +902,7 @@ public class SessionProxy {
let pushedFraming = pushReply.compressionFraming
if let negFraming = pushedFraming {
log.info("\tNegotiated compression framing: \(negFraming.rawValue)")
log.info("\tNegotiated compression framing: \(negFraming)")
}
if let negPing = pushReply.ping {
log.info("\tNegotiated keep-alive: \(negPing) seconds")