summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-10-26 01:08:08 +0200
committerLennart Poettering <lennart@poettering.net>2012-10-26 01:18:41 +0200
commit7fb4d896e1ff018d91498f0e83b02e2534644907 (patch)
tree847bb81fc96c1cb8bb66357e7fe7ace0bc677ddb /src/journal
parent0f91dd8749c1a1ec308cc645269be92166413e38 (diff)
test: extend test-send to send some weirder data
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/test-journal-send.c17
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;
}