Rename debugging property to loggingEnabled, since it really just controls whether or not logging is enabled.
This commit is contained in:
parent
d94f8a5492
commit
16b2e55f5f
@ -39,8 +39,8 @@ struct QueueCall: Equatable {
|
|||||||
private var lastCallTime = Date.distantFuture
|
private var lastCallTime = Date.distantFuture
|
||||||
private var timer: Timer? = nil
|
private var timer: Timer? = nil
|
||||||
private var calls = [QueueCall]()
|
private var calls = [QueueCall]()
|
||||||
private var debugging = false
|
|
||||||
|
|
||||||
|
private var loggingEnabled = false
|
||||||
private static let logger = Logger(subsystem: Bundle.main.bundleIdentifier!, category: "CoalescingQueue")
|
private static let logger = Logger(subsystem: Bundle.main.bundleIdentifier!, category: "CoalescingQueue")
|
||||||
private var logger: Logger {
|
private var logger: Logger {
|
||||||
Self.logger
|
Self.logger
|
||||||
@ -58,7 +58,7 @@ struct QueueCall: Equatable {
|
|||||||
|
|
||||||
public func performCallsImmediately() {
|
public func performCallsImmediately() {
|
||||||
|
|
||||||
if debugging {
|
if loggingEnabled {
|
||||||
logger.debug("CoalescingQueue performing calls: \(self.name)")
|
logger.debug("CoalescingQueue performing calls: \(self.name)")
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ private extension CoalescingQueue {
|
|||||||
|
|
||||||
func add(_ call: QueueCall) {
|
func add(_ call: QueueCall) {
|
||||||
|
|
||||||
if debugging {
|
if loggingEnabled {
|
||||||
logger.debug("CoalescingQueue adding to queue: \(self.name)")
|
logger.debug("CoalescingQueue adding to queue: \(self.name)")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user