NFC: Ignore deprecation of asl_log in SourceKit.

ASL is deprecated in macOS 10.12. It may be time to transition to os_log now
that deployment targets have been raised to 10.12, but until that project
starts these warnings are just pollution.

Filed rdar://121076739 to track adoption of `os_log()` if appropriate.
This commit is contained in:
Allan Shortlidge
2024-01-16 14:21:24 -08:00
parent 3b3abdc90a
commit 064afb9d15

View File

@@ -66,6 +66,9 @@ Logger::~Logger() {
fprintf(stderr, "%s: %s\n", LoggerName.c_str(), LogMsg.c_str());
#if __APPLE__
// rdar://121076739
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
// Use the Apple System Log facility.
aslclient asl = asl_open(LoggerName.c_str(), "com.apple.console",
ASL_OPT_NO_DELAY);
@@ -76,5 +79,6 @@ Logger::~Logger() {
asl_send(asl, msg);
asl_free(msg);
asl_close(asl);
#pragma clang diagnostic pop
#endif
}