this is only tangentially relevant to what op is asking for - i remember
having to do something like this to trace every function enter / exit into
a log:
func foo() {
enter() { defer exit() }
...
...
}
and copy-paste that mantra at the beginning of every function. the enter /
exit would do some printing of the method name (function) among other
things.
it was a bit annoying manually doing so in every method, and one of course
can dream of some automated built-in facility to the same effect. until
that time, manual tricks like this will do.
Mike
···
on Date: Wed, 01 Nov 2017 10:58:38 -0700 Max Moiseev <moiseev@apple.com> wrote:
I believe you are looking for the «one true way of doing logging» that is
community accepted, but it does not have to be in the standard library to
be that. A standalone package would do just as well. swift-server-dev
mailing list might be a better place to discuss this idea.