Skip to content

Commit 392344e

Browse files
committed
Update
1 parent e343047 commit 392344e

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

Tool/Sources/AXExtension/AXUIElement.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -380,14 +380,14 @@ public extension AXUIElement {
380380
_ = _traverse(element: self, level: 0, info: info, handle: handle)
381381

382382
#if DEBUG
383-
let duration = Date().timeIntervalSince(startDate)
384-
.formatted(.number.precision(.fractionLength(0...4)))
385-
Logger.service.debug(
386-
"AXUIElement.traverse count: \(count), took \(duration) seconds",
387-
file: file,
388-
line: line,
389-
function: function
390-
)
383+
// let duration = Date().timeIntervalSince(startDate)
384+
// .formatted(.number.precision(.fractionLength(0...4)))
385+
// Logger.service.debug(
386+
// "AXUIElement.traverse count: \(count), took \(duration) seconds",
387+
// file: file,
388+
// line: line,
389+
// function: function
390+
// )
391391
#endif
392392
}
393393

Tool/Sources/Logger/Logger.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ public final class Logger {
5353
osLogType = .error
5454
}
5555

56+
#if DEBUG
57+
os_log("%{public}@", log: osLog, type: osLogType, "\(file):\(line) \(function)\n\n\(message)" as CVarArg)
58+
#else
5659
os_log("%{public}@", log: osLog, type: osLogType, message as CVarArg)
60+
#endif
5761
}
5862

5963
public func debug(

0 commit comments

Comments
 (0)