mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user