automerge / automerge-repo-swift

Extends the Automerge-swift library, providing support for working with multiple Automerge documents at once, with pluggable network and storage providers.
https://swiftpackageindex.com/automerge/automerge-repo-swift/documentation/automergerepo
MIT License
23 stars 4 forks source link

Establishing a filtering mechanism to optionally vend loggers #72

Closed heckj closed 6 months ago

heckj commented 6 months ago

resolves #66

I'm annoyed with this as a pattern, but I couldn't seem to come up with a way to wrap OSLog due to compiler-magic that enables the privacy interpolation, and I thought it was more valuable to keep that privacy capability in place. So instead Ive wrapped all calls to .trace() or .debug() in checks against a dynamic log verbosity (at least for the repo) so that relevant information won't be spewing out into the Unified Logging system on Apple platforms.

Apple's tools are substandard to keep the unified logging information from being overwhelming while doing general debugging, but it is handy when you need it, so I took the time to make it dynamic and programmaticly controllable