Rohit Saini
Jul 16, 2024

--

static func printStackTrace(maxDepth: Int = Int.max) {

callStack

.dropFirst() // drop Thread.printStacktrace

.prefix(maxDepth)

.enumerated()

.forEach { index, line in

Orchard.d("[\(Thread.betterIdentifier)] #\(index): \(line)")

}

}

you can filter-out the unwanted strackTrace by using index

if i am making any sense here

btw thanks for stopping by

--

--

Responses (1)