Also finding that our ancient syslog calls are just going out to the console even without an openlog call. And there's no API to test if syslog is open or not. So I'll remove that code too, and just go to printf. But I'd like to use os_log solely for the file/line jump. But I need to be able to call __builtin_return_address() and hand that (and the dso_handle?) or file/line/function to the logging system. Being unable to send all logs to a central point in my game code, and do filtering, and locking a mutex, and breaking up multiple os_logs, and supplementing additional data that each macro doesn't is important. I can't do this in Swift, ObjC, or C++. There is no viable log call using NSLog, syslog, and os_log_impl since these all appear to call __builtin_return_address(0) internally. So that forces these Apple specific calls to be injected into all sorts of code that doesn't need that to get the correct file/line.
Topic:
App & System Services
SubTopic:
Core OS
Tags: