diff options
Diffstat (limited to 'src/journal/test-journal-send.c')
-rw-r--r-- | src/journal/test-journal-send.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/journal/test-journal-send.c b/src/journal/test-journal-send.c index 9bf42f9b8d..3e986ed99a 100644 --- a/src/journal/test-journal-send.c +++ b/src/journal/test-journal-send.c @@ -20,6 +20,8 @@ ***/ #include <systemd/sd-journal.h> +#include <stdlib.h> +#include <unistd.h> #include "log.h" @@ -57,5 +59,20 @@ int main(int argc, char *argv[]) { "WITH_BINARY=this is a binary value \a", NULL); + syslog(LOG_NOTICE, "Hello World!"); + + sd_journal_print(LOG_NOTICE, "Hello World"); + + sd_journal_send("MESSAGE=Hello World!", + "MESSAGE_ID=52fb62f99e2c49d89cfbf9d6de5e3555", + "PRIORITY=5", + "HOME=%s", getenv("HOME"), + "TERM=%s", getenv("TERM"), + "PAGE_SIZE=%li", sysconf(_SC_PAGESIZE), + "N_CPUS=%li", sysconf(_SC_NPROCESSORS_ONLN), + NULL); + + sleep(10); + return 0; } |