From 05f8d13ed9c13392dc1f42e85cd5093eecde5c30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Wed, 12 Nov 2003 16:42:13 +0000 Subject: [PATCH] Now also checks if the context is kept after a closelog(). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5337 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/tests/kernel/libroot/posix/SyslogTest.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/tests/kernel/libroot/posix/SyslogTest.cpp b/src/tests/kernel/libroot/posix/SyslogTest.cpp index 2e94aacc94..26cc7a2918 100644 --- a/src/tests/kernel/libroot/posix/SyslogTest.cpp +++ b/src/tests/kernel/libroot/posix/SyslogTest.cpp @@ -42,8 +42,13 @@ main(int argc, char **argv) syslog(LOG_WARNING, "thread/perror warning (visible in stderr as well)"); syslog(LOG_CRIT, "thread/perror critical condition (hidden)"); - openlog(NULL, LOG_CONS, LOG_DAEMON); + openlog(NULL, LOG_CONS | LOG_PID, LOG_DAEMON); syslog(LOG_WARNING, "thread/cons warning (visible in stderr only when there is no syslog_daemon)"); + setlogmask(LOG_EMERG); + closelog(); + // this should inherit the team log context on next logging entry + + syslog(LOG_ALERT, "now what are we doing here? (visible)"); return 0; }