chiark / gitweb /
journald: avoid logging to kmsg in the normal paths
authorLennart Poettering <lennart@poettering.net>
Thu, 6 Sep 2012 07:32:51 +0000 (00:32 -0700)
committerLennart Poettering <lennart@poettering.net>
Thu, 6 Sep 2012 07:32:51 +0000 (00:32 -0700)
TODO
src/journal/journal-file.c
src/journal/journal-vacuum.c
src/journal/journald-kmsg.c
src/journal/journald.c

diff --git a/TODO b/TODO
index 59617a2ed0894d57f29730ef31b8599edeca3bc7..30e2f8e24840d6967a6f212d5603065cc29c0b91 100644 (file)
--- 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)
index 79f759897a864377935fe2ed9caf09b1bea7a567..697e7f3606896add66c83255386667d80ad84716 100644 (file)
@@ -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) {
index ff2cd3306d0a2bf993c7ded366815aee002cf73f..c89014653784d88e5634dc27a6d07ec8966ef7a8 100644 (file)
@@ -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);
index b259480abc170378f72bfd32274917fd46ed8b3a..284ace984d58f839731bce88f0c0d34a91e3d13f 100644 (file)
@@ -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);
index a1deceabdf2bef696239a695b2c37538c42e7177..5d0d2033f2c3425d3ba80d9d1c2cf668c32fc575 100644 (file)
@@ -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;
                 }