summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-09-06 00:32:51 -0700
committerLennart Poettering <lennart@poettering.net>2012-09-06 00:32:51 -0700
commit2b43f939a4b3ad5aeb2650868b0234ff42ec0045 (patch)
tree0a00545aa5bd8791fe14d65ea0faf94020625712
parentf687b2738229570453c9412add6b9c4f99c9c004 (diff)
journald: avoid logging to kmsg in the normal paths
-rw-r--r--TODO6
-rw-r--r--src/journal/journal-file.c12
-rw-r--r--src/journal/journal-vacuum.c2
-rw-r--r--src/journal/journald-kmsg.c2
-rw-r--r--src/journal/journald.c26
5 files changed, 21 insertions, 27 deletions
diff --git a/TODO b/TODO
index 59617a2ed0..30e2f8e248 100644
--- a/TODO
+++ b/TODO
@@ -51,8 +51,6 @@ Features:
* Query Paul Moore about relabelling socket fds while they are open
-* log fewer journal internal messages to the kernel kmsg
-
* move keymaps to /usr/lib/... rather than /usr/lib/udev/...
* journald: check whether it is OK if the client can still modify delivered journal entries
@@ -209,8 +207,6 @@ Features:
* journal: hook up with EFI firmware log
-* handle C-A-Del in logind, like the power/suspend buttons?
-
* nspawn: make use of device cgroup contrller by default
* drop accountsservice's StandardOutput=syslog and Type=dbus fields
@@ -337,8 +333,6 @@ Features:
* journalctl: --cursor support
-* systemctl status: show coredumps
-
* save coredump in Windows/Mozilla minidump format
* support crash reporting operation modes (https://live.gnome.org/GnomeOS/Design/Whiteboards/ProblemReporting)
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index 79f759897a..697e7f3606 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -490,7 +490,7 @@ static int journal_file_setup_data_hash_table(JournalFile *f) {
if (s < DEFAULT_DATA_HASH_TABLE_SIZE)
s = DEFAULT_DATA_HASH_TABLE_SIZE;
- log_info("Reserving %llu entries in hash table.", (unsigned long long) (s / sizeof(HashItem)));
+ log_debug("Reserving %llu entries in hash table.", (unsigned long long) (s / sizeof(HashItem)));
r = journal_file_append_object(f,
OBJECT_DATA_HASH_TABLE,
@@ -2386,11 +2386,11 @@ void journal_default_metrics(JournalMetrics *m, int fd) {
m->keep_free = DEFAULT_KEEP_FREE;
}
- log_info("Fixed max_use=%s max_size=%s min_size=%s keep_free=%s",
- format_bytes(a, sizeof(a), m->max_use),
- format_bytes(b, sizeof(b), m->max_size),
- format_bytes(c, sizeof(c), m->min_size),
- format_bytes(d, sizeof(d), m->keep_free));
+ log_debug("Fixed max_use=%s max_size=%s min_size=%s keep_free=%s",
+ format_bytes(a, sizeof(a), m->max_use),
+ format_bytes(b, sizeof(b), m->max_size),
+ format_bytes(c, sizeof(c), m->min_size),
+ format_bytes(d, sizeof(d), m->keep_free));
}
int journal_file_get_cutoff_realtime_usec(JournalFile *f, usec_t *from, usec_t *to) {
diff --git a/src/journal/journal-vacuum.c b/src/journal/journal-vacuum.c
index ff2cd3306d..c890146537 100644
--- a/src/journal/journal-vacuum.c
+++ b/src/journal/journal-vacuum.c
@@ -211,7 +211,7 @@ int journal_directory_vacuum(const char *directory, uint64_t max_use, uint64_t m
break;
if (unlinkat(dirfd(d), list[i].filename, 0) >= 0) {
- log_info("Deleted archived journal %s/%s.", directory, list[i].filename);
+ log_debug("Deleted archived journal %s/%s.", directory, list[i].filename);
sum -= list[i].usage;
} else if (errno != ENOENT)
log_warning("Failed to delete %s/%s: %m", directory, list[i].filename);
diff --git a/src/journal/journald-kmsg.c b/src/journal/journald-kmsg.c
index b259480abc..284ace984d 100644
--- a/src/journal/journald-kmsg.c
+++ b/src/journal/journald-kmsg.c
@@ -359,7 +359,7 @@ int server_flush_dev_kmsg(Server *s) {
if (!s->dev_kmsg_readable)
return 0;
- log_info("Flushing /dev/kmsg...");
+ log_debug("Flushing /dev/kmsg...");
for (;;) {
r = server_read_dev_kmsg(s);
diff --git a/src/journal/journald.c b/src/journal/journald.c
index a1deceabdf..5d0d2033f2 100644
--- a/src/journal/journald.c
+++ b/src/journal/journald.c
@@ -304,7 +304,7 @@ static void server_rotate(Server *s) {
Iterator i;
int r;
- log_info("Rotating...");
+ log_debug("Rotating...");
if (s->runtime_journal) {
r = journal_file_rotate(&s->runtime_journal, s->compress, false);
@@ -349,7 +349,7 @@ static void server_vacuum(Server *s) {
sd_id128_t machine;
int r;
- log_info("Vacuuming...");
+ log_debug("Vacuuming...");
r = sd_id128_get_machine(&machine);
if (r < 0) {
@@ -444,7 +444,7 @@ static void write_to_journal(Server *s, uid_t uid, struct iovec *iovec, unsigned
return;
if (journal_file_rotate_suggested(f)) {
- log_info("Journal header limits reached or header out-of-date, rotating.");
+ log_debug("Journal header limits reached or header out-of-date, rotating.");
server_rotate(s);
server_vacuum(s);
vacuumed = true;
@@ -475,11 +475,11 @@ static void write_to_journal(Server *s, uid_t uid, struct iovec *iovec, unsigned
}
if (r == -E2BIG || r == -EFBIG || r == EDQUOT || r == ENOSPC)
- log_info("Allocation limit reached, rotating.");
+ log_debug("Allocation limit reached, rotating.");
else if (r == -EHOSTDOWN)
log_info("Journal file from other machine, rotating.");
else if (r == -EBUSY)
- log_info("Unlcean shutdown, rotating.");
+ log_info("Unclean shutdown, rotating.");
else
log_warning("Journal file corrupted, rotating.");
@@ -491,7 +491,7 @@ static void write_to_journal(Server *s, uid_t uid, struct iovec *iovec, unsigned
if (!f)
return;
- log_info("Retrying write.");
+ log_debug("Retrying write.");
}
}
@@ -890,7 +890,7 @@ static int server_flush_to_var(Server *s) {
if (!s->system_journal)
return 0;
- log_info("Flushing to /var...");
+ log_debug("Flushing to /var...");
r = sd_id128_get_machine(&machine);
if (r < 0) {
@@ -918,7 +918,7 @@ static int server_flush_to_var(Server *s) {
r = journal_file_copy_entry(f, s->system_journal, o, f->current_offset, NULL, NULL, NULL);
if (r == -E2BIG) {
- log_info("Allocation limit reached.");
+ log_debug("Allocation limit reached.");
journal_file_post_change(s->system_journal);
server_rotate(s);
@@ -954,7 +954,7 @@ static int process_event(Server *s, struct epoll_event *ev) {
ssize_t n;
if (ev->events != EPOLLIN) {
- log_info("Got invalid event from epoll.");
+ log_error("Got invalid event from epoll.");
return -EIO;
}
@@ -990,7 +990,7 @@ static int process_event(Server *s, struct epoll_event *ev) {
int r;
if (ev->events != EPOLLIN) {
- log_info("Got invalid event from epoll.");
+ log_error("Got invalid event from epoll.");
return -EIO;
}
@@ -1004,7 +1004,7 @@ static int process_event(Server *s, struct epoll_event *ev) {
ev->data.fd == s->syslog_fd) {
if (ev->events != EPOLLIN) {
- log_info("Got invalid event from epoll.");
+ log_error("Got invalid event from epoll.");
return -EIO;
}
@@ -1132,7 +1132,7 @@ static int process_event(Server *s, struct epoll_event *ev) {
} else if (ev->data.fd == s->stdout_fd) {
if (ev->events != EPOLLIN) {
- log_info("Got invalid event from epoll.");
+ log_error("Got invalid event from epoll.");
return -EIO;
}
@@ -1143,7 +1143,7 @@ static int process_event(Server *s, struct epoll_event *ev) {
StdoutStream *stream;
if ((ev->events|EPOLLIN|EPOLLHUP) != (EPOLLIN|EPOLLHUP)) {
- log_info("Got invalid event from epoll.");
+ log_error("Got invalid event from epoll.");
return -EIO;
}