chiark / gitweb /
log: make internal log api log directly to the journal
[elogind.git] / src / journal / journal-send.c
index c382264682efd785e52c8e77596f81c8c24819fe..d51aec9690bf48e22988efeceb4bcba8022140bb 100644 (file)
@@ -195,7 +195,7 @@ _public_ int sd_journal_sendv(const struct iovec *iov, int n) {
 
         zero(sa);
         sa.sun_family = AF_UNIX;
-        strncpy(sa.sun_path,"/run/systemd/journal/socket", sizeof(sa.sun_path));
+        strncpy(sa.sun_path, "/run/systemd/journal/socket", sizeof(sa.sun_path));
 
         zero(mh);
         mh.msg_name = &sa;
@@ -209,7 +209,7 @@ _public_ int sd_journal_sendv(const struct iovec *iov, int n) {
         return 0;
 }
 
-_public_ int sd_journal_stream_fd(const char *tag, int priority, int priority_prefix) {
+_public_ int sd_journal_stream_fd(const char *identifier, int priority, int level_prefix) {
         union sockaddr_union sa;
         int fd;
         char *header;
@@ -238,17 +238,17 @@ _public_ int sd_journal_stream_fd(const char *tag, int priority, int priority_pr
                 return -errno;
         }
 
-        if (!tag)
-                tag = "";
+        if (!identifier)
+                identifier = "";
 
-        l = strlen(tag);
+        l = strlen(identifier);
         header = alloca(l + 1 + 2 + 2 + 2 + 2 + 2);
 
-        memcpy(header, tag, l);
+        memcpy(header, identifier, l);
         header[l++] = '\n';
         header[l++] = '0' + priority;
         header[l++] = '\n';
-        header[l++] = '0' + !!priority_prefix;
+        header[l++] = '0' + !!level_prefix;
         header[l++] = '\n';
         header[l++] = '0';
         header[l++] = '\n';