@@ -176,9 +176,6 @@ void append_hexified_string(std::ostream &ostrm, const std::string &string) {
176176 }
177177}
178178
179- extern void ASLLogCallback (void *baton, uint32_t flags, const char *format,
180- va_list args);
181-
182179// from System.framework/Versions/B/PrivateHeaders/sys/codesign.h
183180extern " C" {
184181#define CS_OPS_STATUS 0 /* return status */
@@ -1773,8 +1770,6 @@ static std::string get_value(std::string &line) {
17731770
17741771extern void FileLogCallback (void *baton, uint32_t flags, const char *format,
17751772 va_list args);
1776- extern void ASLLogCallback (void *baton, uint32_t flags, const char *format,
1777- va_list args);
17781773
17791774rnb_err_t RNBRemote::HandlePacket_qRcmd (const char *p) {
17801775 const char *c = p + strlen (" qRcmd," );
@@ -1809,8 +1804,8 @@ rnb_err_t RNBRemote::HandlePacket_qRcmd(const char *p) {
18091804 static_cast <uint32_t >(strtoul (value.c_str (), &end, 0 ));
18101805 if (errno == 0 && end && *end == ' \0 ' ) {
18111806 DNBLogSetLogMask (logmask);
1812- if (! DNBLogGetLogCallback ())
1813- DNBLogSetLogCallback (ASLLogCallback, NULL );
1807+ if (auto log_callback = OsLogger::GetLogFunction ())
1808+ DNBLogSetLogCallback (log_callback, nullptr );
18141809 return SendPacket (" OK" );
18151810 }
18161811 errno = 0 ;
@@ -2177,13 +2172,8 @@ rnb_err_t set_logging(const char *p) {
21772172 // Enable DNB logging.
21782173 // Use the existing log callback if one was already configured.
21792174 if (!DNBLogGetLogCallback ()) {
2180- // Use the os_log()-based logger if available; otherwise,
2181- // fallback to ASL.
2182- auto log_callback = OsLogger::GetLogFunction ();
2183- if (log_callback)
2175+ if (auto log_callback = OsLogger::GetLogFunction ())
21842176 DNBLogSetLogCallback (log_callback, nullptr );
2185- else
2186- DNBLogSetLogCallback (ASLLogCallback, nullptr );
21872177 }
21882178
21892179 // Update logging to use the configured log channel bitmask.
0 commit comments