chiark / gitweb /
journal: never fail if we cannot access /var, just print a warning
[elogind.git] / src / journal / journalctl.c
index 5a1cb6e88a7ab8169d985f1aba913634fa67ec96..701518244c116e63a487eaaa839cd8772f2c60db 100644 (file)
@@ -444,9 +444,6 @@ int main(int argc, char *argv[]) {
         sd_journal *j = NULL;
         unsigned line = 0;
 
-        log_set_max_level(LOG_DEBUG);
-        log_set_target(LOG_TARGET_CONSOLE);
-
         log_parse_environment();
         log_open();
 
@@ -454,7 +451,7 @@ int main(int argc, char *argv[]) {
         if (r <= 0)
                 goto finish;
 
-        r = sd_journal_open(&j);
+        r = sd_journal_open(&j, 0);
         if (r < 0) {
                 log_error("Failed to open journal: %s", strerror(-r));
                 goto finish;