Swiftpack.co -  grigorye/GETracing as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
Seamless tracing for Swift.
.package(url: "https://github.com/grigorye/GETracing.git", from: "0.1.2")

Actions Status


Easily trace value and literal of a Swift expression right at the point of evaluation.


  • Avoid repeating yourself.
  • Avoid introducing variables just to keep a value of expression (otherwise re-evaluated) for logging. Evaluate just once, whether there's tracing or not.
  • Get the expression literals traced in addition to the values.
  • Keep the code changes to the minimum. Make tracing (and reverting from tracing) as seamless as possible.


Any Swift expression


that needs tracing is replaced with


and that's it. Nested expressions might be traced as well.


x$ alternative might be defined as necessary by the client.

Logging implementation should be defined by the client.


Tracing might be reverted by removal of x$() or even removal of x$, leaving () in place.

Alternatively, tracing might be disabled per-block.

Current Limitations

It's required to bundle the corresponding source files together with the modules, if you want to see the expression literals for the traced stuff, as they're looked up at runtime. It might be improved later. For now, for performance reasons, it's possible to disable the lookup completely. (Theoretically) it's possible to recover the literals given the traced output with lookups disabled.

Related Projects

Tuna Xcode Plugin


Stars: 1
Last commit: 2 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Release Notes

2 years ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API