Skip to content

Commit

Permalink
chore: Tweak log warning for high wait timeouts (#380)
Browse files Browse the repository at this point in the history
  • Loading branch information
keelerm84 committed May 9, 2024
1 parent f1532c7 commit 2711aa7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions LaunchDarkly/LaunchDarkly/LDClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ public class LDClient {
*/
public func identify(context: LDContext, timeout: TimeInterval, completion: @escaping ((_ result: IdentifyResult) -> Void)) {
if timeout > LDClient.longTimeoutInterval {
os_log("%s LDClient.identify called with high timeout parameter %s", log: config.logger, type: .debug, self.typeName(and: #function))
os_log("%s LDClient.identify was called with a timeout greater than %d seconds. We recommend a timeout of less than %s seconds.", log: config.logger, type: .debug, self.typeName(and: #function), LDClient.longTimeoutInterval, LDClient.longTimeoutInterval)
}

var cancel = false
Expand Down Expand Up @@ -763,7 +763,7 @@ public class LDClient {
*/
public static func start(config: LDConfig, context: LDContext? = nil, startWaitSeconds: TimeInterval, completion: ((_ timedOut: Bool) -> Void)? = nil) {
if startWaitSeconds > LDClient.longTimeoutInterval {
os_log("%s LDClient.start called with high timeout parameter %s", log: config.logger, type: .debug, self.typeName(and: #function))
os_log("%s LDClient.start was called with a timeout greater than %d seconds. We recommend a timeout of less than %s seconds.", log: config.logger, type: .debug, self.typeName(and: #function), LDClient.longTimeoutInterval, LDClient.longTimeoutInterval)
}

start(serviceFactory: nil, config: config, context: context, startWaitSeconds: startWaitSeconds, completion: completion)
Expand Down

0 comments on commit 2711aa7

Please sign in to comment.