[systemd-commits] 2 commits - src/core src/journal src/journal-remote src/shared
Zbigniew Jędrzejewski-Szmek
zbyszek at kemper.freedesktop.org
Mon Jan 5 21:35:09 PST 2015
src/core/execute.c | 4 ++--
src/journal-remote/journal-upload.c | 5 +++--
src/journal/coredumpctl.c | 2 +-
src/journal/journalctl.c | 2 +-
src/shared/logs-show.c | 2 +-
5 files changed, 8 insertions(+), 7 deletions(-)
New commits:
commit 553d2243e2a42783b8bb94addfb752b802c23311
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date: Tue Jan 6 00:29:40 2015 -0500
tree-wide: remove unnecessary LOG_PRI
LOG_DEBUG is already a log level, there is no need to use LOG_PRI which
is for filtering out the facility.
diff --git a/src/core/execute.c b/src/core/execute.c
index 51e1e87..0af4227 100644
--- a/src/core/execute.c
+++ b/src/core/execute.c
@@ -797,7 +797,7 @@ static int setup_pam(
* daemon. We do things this way to ensure that the main PID
* of the daemon is the one we initially fork()ed. */
- if (log_get_max_level() < LOG_PRI(LOG_DEBUG))
+ if (log_get_max_level() < LOG_DEBUG)
flags |= PAM_SILENT;
pam_code = pam_start(name, user, &conv, &handle);
@@ -1782,7 +1782,7 @@ static int exec_child(ExecCommand *command,
final_env = strv_env_clean(final_env);
- if (_unlikely_(log_get_max_level() >= LOG_PRI(LOG_DEBUG))) {
+ if (_unlikely_(log_get_max_level() >= LOG_DEBUG)) {
_cleanup_free_ char *line;
line = exec_command_line(final_argv);
diff --git a/src/journal/coredumpctl.c b/src/journal/coredumpctl.c
index 756e793..afb39ad 100644
--- a/src/journal/coredumpctl.c
+++ b/src/journal/coredumpctl.c
@@ -822,7 +822,7 @@ int main(int argc, char *argv[]) {
}
}
- if (_unlikely_(log_get_max_level() >= LOG_PRI(LOG_DEBUG))) {
+ if (_unlikely_(log_get_max_level() >= LOG_DEBUG)) {
_cleanup_free_ char *filter;
filter = journal_make_match_string(j);
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index c91f2cf..386e350 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -1875,7 +1875,7 @@ int main(int argc, char *argv[]) {
return EXIT_FAILURE;
}
- if (_unlikely_(log_get_max_level() >= LOG_PRI(LOG_DEBUG))) {
+ if (_unlikely_(log_get_max_level() >= LOG_DEBUG)) {
_cleanup_free_ char *filter;
filter = journal_make_match_string(j);
diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c
index 98972ed..dff0d30 100644
--- a/src/shared/logs-show.c
+++ b/src/shared/logs-show.c
@@ -1263,7 +1263,7 @@ int show_journal_by_unit(
if (r < 0)
return r;
- if (_unlikely_(log_get_max_level() >= LOG_PRI(LOG_DEBUG))) {
+ if (_unlikely_(log_get_max_level() >= LOG_DEBUG)) {
_cleanup_free_ char *filter;
filter = journal_make_match_string(j);
commit 5dabb1e04e4521abf040e77a8322b70e7acdc7b0
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date: Tue Jan 6 00:26:26 2015 -0500
journal-upload: enable curl debug output conditionally
https://bugs.freedesktop.org/show_bug.cgi?id=86464
diff --git a/src/journal-remote/journal-upload.c b/src/journal-remote/journal-upload.c
index 5b25da5..50332ed 100644
--- a/src/journal-remote/journal-upload.c
+++ b/src/journal-remote/journal-upload.c
@@ -236,8 +236,9 @@ int start_upload(Uploader *u,
easy_setopt(curl, CURLOPT_HTTPHEADER, u->header,
LOG_ERR, return -EXFULL);
- /* enable verbose for easier tracing */
- easy_setopt(curl, CURLOPT_VERBOSE, 1L, LOG_WARNING, );
+ if (_unlikely_(log_get_max_level() >= LOG_DEBUG))
+ /* enable verbose for easier tracing */
+ easy_setopt(curl, CURLOPT_VERBOSE, 1L, LOG_WARNING, );
easy_setopt(curl, CURLOPT_USERAGENT,
"systemd-journal-upload " PACKAGE_STRING,
More information about the systemd-commits
mailing list