Is it possible to use the os module Logging C API Collection from Swift without hacks?

As you know, not all os module Logging C API is currently available in Swift. For example, Trace Activities is not available. And here there are two complications:

  • Is there any way to use all of the available api without hacks;
  • and if so, how to avoid nesting of functions when writing wrapper and other complexities.

To answer myself for my second question, I know that there are at least a few attributes that Apple itself uses for wrapping over the os_log family. These are @_transparent @_optimize(none) @_semantics("oslog.requires_constant_arguments") @_semantics("constant_evaluable") and so on, but of this whole set of attributes I only know @_transaprent and yet I have never heard about compile time constant values or anything like that in Swift.

So how is it possible at this point to write your own wrapper over such an important api without waiting for Apple to fully deign to do it.