X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fjournal%2Fsd-journal.h;h=7f9f78598b7917a9696a0c52bb3b2ac1461e1314;hb=2a59ea54f136f8fcf6a4e1bdfc51448c81281a3e;hp=8d7e314223c1ce008b2fc23224fc1a16c95c79e9;hpb=1e2579fdeb7608719cb28da0b5061f48ba0efc34;p=elogind.git diff --git a/src/journal/sd-journal.h b/src/journal/sd-journal.h index 8d7e31422..7f9f78598 100644 --- a/src/journal/sd-journal.h +++ b/src/journal/sd-journal.h @@ -24,25 +24,40 @@ #include #include +#include +#include #include "sd-id128.h" /* TODO: * * - check LE/BE conversion for 8bit, 16bit, 32bit values - * - implement inotify usage on client * - implement audit gateway - * - implement native gateway - * - implement stdout gateway * - extend hash tables table as we go * - accelerate looking for "all hostnames" and suchlike. - * - throttling - * - enforce limit on open journal files in journald and journalctl * - cryptographic hash - * - fix space reservation logic - * - comm, argv can be manipulated, should it be _COMM=, _CMDLINE= or COMM=, CMDLINE=? + * - OR of matches is borked... + * - flush /run to /var + * - hookup with systemctl + * - local deserializer + * - think about manipulations of header + * - http server + * - handle incomplete header + * - message catalog */ +/* Write to daemon */ + +int sd_journal_print(int piority, const char *format, ...) __attribute__ ((format (printf, 2, 3))); +int sd_journal_printv(int priority, const char *format, va_list ap); + +int sd_journal_send(const char *format, ...) __attribute__((sentinel)); +int sd_journal_sendv(const struct iovec *iov, int n); + +int sd_journal_stream_fd(const char *tag, int priority, int priority_prefix); + +/* Browse journal stream */ + typedef struct sd_journal sd_journal; int sd_journal_open(sd_journal **ret); @@ -82,16 +97,16 @@ enum { SD_JOURNAL_INVALIDATE_REMOVE }; -int sd_journal_get_fd(sd_journal *j); /* missing */ -int sd_journal_process(sd_journal *j); /* missing */ +int sd_journal_get_fd(sd_journal *j); +int sd_journal_process(sd_journal *j); #define SD_JOURNAL_FOREACH(j) \ if (sd_journal_seek_head(j) >= 0) \ - while (sd_journal_next(j) > 0) \ + while (sd_journal_next(j) > 0) #define SD_JOURNAL_FOREACH_BACKWARDS(j) \ if (sd_journal_seek_tail(j) >= 0) \ - while (sd_journal_previous(j) > 0) \ + while (sd_journal_previous(j) > 0) #define SD_JOURNAL_FOREACH_DATA(j, data, l) \ for (sd_journal_restart_data(j); sd_journal_enumerate_data((j), &(data), &(l)) > 0; )