chiark / gitweb /
log: unify log env var prefix
[elogind.git] / src / log.c
index 4f9f2da2592c5a99ad96eec34ba5d7b927afbbcb..a47285cb2129130e463ed822767ac1fa501d3088 100644 (file)
--- a/src/log.c
+++ b/src/log.c
@@ -265,7 +265,7 @@ static int write_to_syslog(
         if (strftime(header_time, sizeof(header_time), "%h %e %T ", tm) <= 0)
                 return -EINVAL;
 
-        snprintf(header_pid, sizeof(header_pid), "[%llu]: ", (unsigned long long) getpid());
+        snprintf(header_pid, sizeof(header_pid), "[%lu]: ", (unsigned long) getpid());
         char_array_0(header_pid);
 
         zero(iovec);
@@ -301,7 +301,7 @@ static int write_to_kmsg(
         snprintf(header_priority, sizeof(header_priority), "<%i>", LOG_PRI(level));
         char_array_0(header_priority);
 
-        snprintf(header_pid, sizeof(header_pid), "[%llu]: ", (unsigned long long) getpid());
+        snprintf(header_pid, sizeof(header_pid), "[%lu]: ", (unsigned long) getpid());
         char_array_0(header_pid);
 
         zero(iovec);
@@ -474,11 +474,11 @@ void log_parse_environment(void) {
                 if (log_set_max_level_from_string(e) < 0)
                         log_warning("Failed to parse log level %s. Ignoring.", e);
 
-        if ((e = getenv("SYSTEMD_SHOW_COLOR")))
+        if ((e = getenv("SYSTEMD_LOG_COLOR")))
                 if (log_show_color_from_string(e) < 0)
                         log_warning("Failed to parse bool %s. Ignoring.", e);
 
-        if ((e = getenv("SYSTEMD_SHOW_LOCATION"))) {
+        if ((e = getenv("SYSTEMD_LOG_LOCATION"))) {
                 if (log_show_location_from_string(e) < 0)
                         log_warning("Failed to parse bool %s. Ignoring.", e);
         }