chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tmpfiles: add new "L+" command as stronger version of "L", that removes the destinati...
[elogind.git]
/
src
/
shared
/
log.c
diff --git
a/src/shared/log.c
b/src/shared/log.c
index a4b3b68ef181e316f74da46f18dbd9399c595784..6f17705abfad8869717f9522f570d7e892486102 100644
(file)
--- a/
src/shared/log.c
+++ b/
src/shared/log.c
@@
-378,7
+378,7
@@
static int write_to_syslog(
if (strftime(header_time, sizeof(header_time), "%h %e %T ", tm) <= 0)
return -EINVAL;
if (strftime(header_time, sizeof(header_time), "%h %e %T ", tm) <= 0)
return -EINVAL;
- snprintf(header_pid, sizeof(header_pid), "[
%lu]: ", (unsigned long)
getpid());
+ snprintf(header_pid, sizeof(header_pid), "[
"PID_FMT"]: ",
getpid());
char_array_0(header_pid);
IOVEC_SET_STRING(iovec[0], header_priority);
char_array_0(header_pid);
IOVEC_SET_STRING(iovec[0], header_priority);
@@
-426,7
+426,7
@@
static int write_to_kmsg(
snprintf(header_priority, sizeof(header_priority), "<%i>", level);
char_array_0(header_priority);
snprintf(header_priority, sizeof(header_priority), "<%i>", level);
char_array_0(header_priority);
- snprintf(header_pid, sizeof(header_pid), "[
%lu]: ", (unsigned long)
getpid());
+ snprintf(header_pid, sizeof(header_pid), "[
"PID_FMT"]: ",
getpid());
char_array_0(header_pid);
IOVEC_SET_STRING(iovec[0], header_priority);
char_array_0(header_pid);
IOVEC_SET_STRING(iovec[0], header_priority);
@@
-878,6
+878,9
@@
void log_parse_environment(void) {
if (l == 5 && startswith(w, "debug")) {
log_set_max_level(LOG_DEBUG);
break;
if (l == 5 && startswith(w, "debug")) {
log_set_max_level(LOG_DEBUG);
break;
+ } else if (l == 5 && startswith(w, "quiet")) {
+ log_set_max_level(LOG_WARNING);
+ break;
}
}
}
}
}
}