Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ca48db9

Browse filesBrowse files
committed
[lldb] Make the system log a NOOP on non-Darwin platforms
As discussed in llvm#111911, we have consensus that as it stands, the system log is only meaningful on Darwin and that by default it should be a NOOP on other platforms. (cherry picked from commit cc13d4f)
1 parent 69789dd commit ca48db9
Copy full SHA for ca48db9

File tree

Expand file treeCollapse file tree

1 file changed

+4
-23
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-23
lines changed

‎lldb/source/Host/common/Host.cpp

Copy file name to clipboardExpand all lines: lldb/source/Host/common/Host.cpp
+4-23Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -89,31 +89,12 @@ using namespace lldb;
8989
using namespace lldb_private;
9090

9191
#if !defined(__APPLE__)
92-
#if !defined(_WIN32)
93-
#include <syslog.h>
94-
void Host::SystemLog(Severity severity, llvm::StringRef message) {
95-
static llvm::once_flag g_openlog_once;
96-
llvm::call_once(g_openlog_once, [] {
97-
openlog("lldb", LOG_CONS | LOG_PID | LOG_NDELAY, LOG_USER);
98-
});
99-
int level = LOG_DEBUG;
100-
switch (severity) {
101-
case lldb::eSeverityInfo:
102-
level = LOG_INFO;
103-
break;
104-
case lldb::eSeverityWarning:
105-
level = LOG_WARNING;
106-
break;
107-
case lldb::eSeverityError:
108-
level = LOG_ERR;
109-
break;
110-
}
111-
syslog(level, "%s", message.data());
112-
}
113-
#else
92+
// The system log is currently only meaningful on Darwin, where this means
93+
// os_log. The meaning of a "system log" isn't as clear on other platforms, and
94+
// therefore we don't providate a default implementation. Vendors are free to
95+
// to implement this function if they have a use for it.
11496
void Host::SystemLog(Severity severity, llvm::StringRef message) {}
11597
#endif
116-
#endif
11798

11899
#if !defined(__APPLE__) && !defined(_WIN32)
119100
static thread_result_t

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.