test: extend test-send to send some weirder data

This commit is contained in:
Lennart Poettering 2012-10-26 01:08:08 +02:00
parent 0f91dd8749
commit 7fb4d896e1
1 changed files with 17 additions and 0 deletions

View File

@ -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;
}