1 /*
2 * Copyright Andrey Semashev 2016.
3 * Distributed under the Boost Software License, Version 1.0.
4 * (See accompanying file LICENSE_1_0.txt or copy at
5 * http://www.boost.org/LICENSE_1_0.txt)
6 */
7
8 #include <syslog.h>
9
main(int,char * [])10 int main(int, char*[])
11 {
12 ::openlog("test", LOG_NDELAY, LOG_USER);
13
14 ::syslog(LOG_USER | LOG_DEBUG, "debug message");
15 ::syslog(LOG_USER | LOG_INFO, "info message");
16 ::syslog(LOG_USER | LOG_NOTICE, "notice message");
17 ::syslog(LOG_USER | LOG_WARNING, "warning message");
18 ::syslog(LOG_USER | LOG_ERR, "error message");
19 ::syslog(LOG_USER | LOG_CRIT, "critical message");
20 ::syslog(LOG_USER | LOG_ALERT, "alert message");
21 ::syslog(LOG_USER | LOG_EMERG, "emergency message");
22
23 ::closelog();
24
25 return 0;
26 }
27