Closed PhilipDukhov closed 3 years ago
This is fix for #86.
Swift stack trace doesn't looks easy to parse.
This is how call from ViewController.configure like looks:
ViewController.configure
$s6Napier14ViewControllerC9configure33_527BB3C17EFDCFA47CE221EFAC2390B7LLyyF + 528
If the cal is made from a struct, it looks much different. Here's stack trace line of Test().pr() and Test.pr() lines:
struct
Test().pr()
Test.pr()
$s6Napier4TestV2pryyF + 84 // instance method $s6Napier4TestV2pryyFZ + 84 // static method
What's usually done in iOS is passing function name with #function and file name with #file, check out apple/swift-log as a reference.
#function
#file
That's why this PR is adding a parameter to be passed from Swift code. Also I've added usage examples.
I found a lot simpler solution, opened #88 instead
This is fix for #86.
Swift stack trace doesn't looks easy to parse.
This is how call from
ViewController.configure
like looks:If the cal is made from a
struct
, it looks much different. Here's stack trace line ofTest().pr()
andTest.pr()
lines:What's usually done in iOS is passing function name with
#function
and file name with#file
, check out apple/swift-log as a reference.That's why this PR is adding a parameter to be passed from Swift code. Also I've added usage examples.