Avatar
omochimetaru 4/14/2020 6:30 PM
#define os_log_with_type(log, type, format, ...) __extension__({ \ os_log_t _log_tmp = (log); \ os_log_type_t _type_tmp = (type); \ if (os_log_type_enabled(_log_tmp, _type_tmp)) { \ OS_LOG_CALL_WITH_FORMAT(_os_log_impl, \ (&__dso_handle, _log_tmp, _type_tmp), format, ##__VA_ARGS__); \ } \ })
6:31 PM
API_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0)) OS_EXPORT OS_NOTHROW OS_WARN_RESULT OS_PURE bool os_log_type_enabled(os_log_t oslog, os_log_type_t type);
6:31 PM
スイッチになってるos_log_type_enabled がシステムAPIなので
6:31 PM
ビルド時の削除は無いかも?
6:31 PM
#define os_log(log, format, ...) \ os_log_with_type(log, OS_LOG_TYPE_DEFAULT, format, ##__VA_ARGS__)
6:32 PM
#define os_log は一箇所しか無さそう。