Index: remoting/host/logging_mac.cc |
diff --git a/remoting/host/logging_mac.cc b/remoting/host/logging_mac.cc |
index 39e007d409b528d5fe9b38307afe9ebc84dd8d94..8d653845214580c5e34b052648eef801ebac065b 100644 |
--- a/remoting/host/logging_mac.cc |
+++ b/remoting/host/logging_mac.cc |
@@ -33,7 +33,7 @@ typedef base::ScopedGeneric<aslmsg, ScopedAslMsgTraits> ScopedAslMsg; |
// Logging message handler that writes to syslog. |
// The log can be obtained by running the following in a terminal: |
// syslog -k Facility org.chromium.chromoting |
-bool LogMessageToAsl( |
+void LogMessageToAsl( |
logging::LogSeverity severity, |
const char* file, |
int line, |
@@ -60,29 +60,28 @@ bool LogMessageToAsl( |
ScopedAslMsg asl_message(asl_new(ASL_TYPE_MSG)); |
if (!asl_message.is_valid()) |
- return false; |
+ return; |
if (asl_set(asl_message.get(), ASL_KEY_FACILITY, |
kChromotingLoggingFacility) != 0) |
- return false; |
+ return; |
if (asl_set(asl_message.get(), ASL_KEY_LEVEL, |
base::IntToString(level).c_str()) != 0) |
- return false; |
+ return; |
// Restrict read access to the message to root and the current user. |
if (asl_set(asl_message.get(), ASL_KEY_READ_UID, |
base::IntToString(geteuid()).c_str()) != 0) |
- return false; |
+ return; |
if (asl_set(asl_message.get(), ASL_KEY_MSG, |
message.c_str() + message_start) != 0) |
- return false; |
+ return; |
asl_send(nullptr, asl_message.get()); |
// Don't prevent message from being logged by traditional means. |
- return false; |
} |
} // namespace |
@@ -94,7 +93,7 @@ void InitHostLogging() { |
logging::InitLogging(settings); |
// Write logs to syslog as well. |
- logging::SetLogMessageHandler(LogMessageToAsl); |
+ logging::AddLogMessageListener(LogMessageToAsl); |
} |
} // namespace remoting |