$ gcc `pkg-config --cflags --libs libsystemd-journal` test.c -o test
$ ./test
$ journalctl -o verbose -o json-pretty /tmp/test
{
"__CURSOR" : "s=2081d5de28a04e728de5058c502f7332;i=217d;b=7a39a4a3858f49149ed0f36f813d5f12;m=585ecd78;t=4e20a1ef5ebf5;x=73da254fe12d8871",
"__REALTIME_TIMESTAMP" : "1374433003826165",
"__MONOTONIC_TIMESTAMP" : "1482607992",
"_BOOT_ID" : "7a39a4a3858f49149ed0f36f813d5f12",
"_UID" : "0",
"_GID" : "0",
"_MACHINE_ID" : "7725dfc225d14958a625ddaaaea5962b",
"PRIORITY" : "5",
"_TRANSPORT" : "journal",
"_HOSTNAME" : "localhost.localdomain",
"_SELINUX_CONTEXT" : "unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023",
"_AUDIT_SESSION" : "2",
"_AUDIT_LOGINUID" : "0",
"_SYSTEMD_CGROUP" : "/user/0.user/2.session",
"_SYSTEMD_SESSION" : "2",
"_SYSTEMD_OWNER_UID" : "0",
"MESSAGE" : "Hello World",
"CODE_FILE" : "test.c",
"CODE_LINE" : "4",
"CODE_FUNC" : "main",
"SYSLOG_IDENTIFIER" : "test",
"_PID" : "1886",
"_COMM" : "test",
"_EXE" : "/tmp/test",
"_CMDLINE" : "./test",
"_SOURCE_REALTIME_TIMESTAMP" : "1374433003822603"
}