chiark / gitweb /
log: bump up a number of log messages so that they are shown even if debug logging...
authorLennart Poettering <lennart@poettering.net>
Wed, 7 Jul 2010 15:57:54 +0000 (17:57 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 7 Jul 2010 15:57:54 +0000 (17:57 +0200)
src/dbus.c
src/logger.c
src/main.c
src/manager.c
src/service.c
src/systemctl.c
src/unit.c

index 576f785..8172197 100644 (file)
@@ -336,10 +336,10 @@ static DBusHandlerResult api_bus_message_filter(DBusConnection *connection, DBus
 
         dbus_error_init(&error);
 
-        /* log_debug("Got D-Bus request: %s.%s() on %s", */
-        /*           dbus_message_get_interface(message), */
-        /*           dbus_message_get_member(message), */
-        /*           dbus_message_get_path(message)); */
+        log_debug("Got D-Bus request: %s.%s() on %s",
+                  dbus_message_get_interface(message),
+                  dbus_message_get_member(message),
+                  dbus_message_get_path(message));
 
         if (dbus_message_is_signal(message, DBUS_INTERFACE_LOCAL, "Disconnected")) {
                 log_error("Warning! API D-Bus connection terminated.");
@@ -441,10 +441,10 @@ static DBusHandlerResult system_bus_message_filter(DBusConnection *connection, D
 
         dbus_error_init(&error);
 
-        /* log_debug("Got D-Bus request: %s.%s() on %s", */
-        /*           dbus_message_get_interface(message), */
-        /*           dbus_message_get_member(message), */
-        /*           dbus_message_get_path(message)); */
+        log_debug("Got D-Bus request: %s.%s() on %s",
+                  dbus_message_get_interface(message),
+                  dbus_message_get_member(message),
+                  dbus_message_get_path(message));
 
         if (dbus_message_is_signal(message, DBUS_INTERFACE_LOCAL, "Disconnected")) {
                 log_error("Warning! System D-Bus connection terminated.");
@@ -472,10 +472,10 @@ static DBusHandlerResult private_bus_message_filter(DBusConnection *connection,
         assert(message);
         assert(m);
 
-        /* log_debug("Got D-Bus request: %s.%s() on %s", */
-        /*           dbus_message_get_interface(message), */
-        /*           dbus_message_get_member(message), */
-        /*           dbus_message_get_path(message)); */
+        log_debug("Got D-Bus request: %s.%s() on %s",
+                  dbus_message_get_interface(message),
+                  dbus_message_get_member(message),
+                  dbus_message_get_path(message));
 
         if (dbus_message_is_signal(message, DBUS_INTERFACE_LOCAL, "Disconnected")) {
                 set_remove(m->bus_connections, connection);
@@ -794,9 +794,9 @@ static int bus_init_system(Manager *m) {
                 goto fail;
         }
 
-        log_debug("Successfully connected to system D-Bus bus %s as %s",
-                  strnull((id = dbus_connection_get_server_id(m->system_bus))),
-                  strnull(dbus_bus_get_unique_name(m->system_bus)));
+        log_info("Successfully connected to system D-Bus bus %s as %s",
+                 strnull((id = dbus_connection_get_server_id(m->system_bus))),
+                 strnull(dbus_bus_get_unique_name(m->system_bus)));
         dbus_free(id);
 
         return 0;
@@ -878,9 +878,9 @@ static int bus_init_api(Manager *m) {
         if ((r = query_name_list(m)) < 0)
                 goto fail;
 
-        log_debug("Successfully connected to API D-Bus bus %s as %s",
-                  strnull((id = dbus_connection_get_server_id(m->api_bus))),
-                  strnull(dbus_bus_get_unique_name(m->api_bus)));
+        log_info("Successfully connected to API D-Bus bus %s as %s",
+                 strnull((id = dbus_connection_get_server_id(m->api_bus))),
+                 strnull(dbus_bus_get_unique_name(m->api_bus)));
         dbus_free(id);
 
         return 0;
@@ -927,7 +927,7 @@ static int bus_init_private(Manager *m) {
 
         dbus_server_set_new_connection_function(m->private_bus, bus_new_connection, m, NULL);
 
-        log_debug("Successfully create private D-Bus server.");
+        log_debug("Successfully created private D-Bus server.");
 
         return 0;
 
index cc394df..d4d964d 100644 (file)
@@ -473,7 +473,7 @@ static int server_init(Server *s, unsigned n_sockets) {
 
         /* /dev/kmsg logging is strictly optional */
         if ((s->kmsg_fd = open("/dev/kmsg", O_WRONLY|O_NOCTTY|O_CLOEXEC)) < 0)
-                log_debug("Failed to open /dev/kmsg for logging, disabling kernel log buffer support: %s", strerror(errno));
+                log_warning("Failed to open /dev/kmsg for logging, disabling kernel log buffer support: %s", strerror(errno));
 
         return 0;
 
index 7e33744..592edbe 100644 (file)
@@ -929,7 +929,7 @@ int main(int argc, char *argv[]) {
         if (getpid() == 1)
                 install_crash_handler();
 
-        log_debug(PACKAGE_STRING " running in %s mode.", manager_running_as_to_string(arg_running_as));
+        log_info(PACKAGE_STRING " running in %s mode.", manager_running_as_to_string(arg_running_as));
 
         if (arg_running_as == MANAGER_SYSTEM && !serialization) {
                 if (arg_show_status)
index e19bacf..c1f70e8 100644 (file)
@@ -689,7 +689,7 @@ static int delete_one_unmergeable_job(Manager *m, Job *j) {
                                 return -ENOEXEC;
 
                         /* Ok, we can drop one, so let's do so. */
-                        log_debug("Trying to fix job merging by deleting job %s/%s", d->unit->meta.id, job_type_to_string(d->type));
+                        log_notice("Trying to fix job merging by deleting job %s/%s", d->unit->meta.id, job_type_to_string(d->type));
                         transaction_delete_job(m, d, true);
                         return 0;
                 }
@@ -840,17 +840,17 @@ static int transaction_verify_order_one(Manager *m, Job *j, Job *from, unsigned
                  * job to remove. We use the marker to find our way
                  * back, since smart how we are we stored our way back
                  * in there. */
-                log_debug("Found ordering cycle on %s/%s", j->unit->meta.id, job_type_to_string(j->type));
+                log_warning("Found ordering cycle on %s/%s", j->unit->meta.id, job_type_to_string(j->type));
 
                 for (k = from; k; k = ((k->generation == generation && k->marker != k) ? k->marker : NULL)) {
 
-                        log_debug("Walked on cycle path to %s/%s", k->unit->meta.id, job_type_to_string(k->type));
+                        log_info("Walked on cycle path to %s/%s", k->unit->meta.id, job_type_to_string(k->type));
 
                         if (!k->installed &&
                             !unit_matters_to_anchor(k->unit, k)) {
                                 /* Ok, we can drop this one, so let's
                                  * do so. */
-                                log_debug("Breaking order cycle by deleting job %s/%s", k->unit->meta.id, job_type_to_string(k->type));
+                                log_warning("Breaking order cycle by deleting job %s/%s", k->unit->meta.id, job_type_to_string(k->type));
                                 transaction_delete_unit(m, k->unit);
                                 return -EAGAIN;
                         }
@@ -861,7 +861,7 @@ static int transaction_verify_order_one(Manager *m, Job *j, Job *from, unsigned
                                 break;
                 }
 
-                log_debug("Unable to break cycle");
+                log_error("Unable to break cycle");
 
                 return -ENOEXEC;
         }
@@ -1004,13 +1004,13 @@ static void transaction_minimize_impact(Manager *m) {
                                         continue;
 
                                 if (stops_running_service)
-                                        log_debug("%s/%s would stop a running service.", j->unit->meta.id, job_type_to_string(j->type));
+                                        log_info("%s/%s would stop a running service.", j->unit->meta.id, job_type_to_string(j->type));
 
                                 if (changes_existing_job)
-                                        log_debug("%s/%s would change existing job.", j->unit->meta.id, job_type_to_string(j->type));
+                                        log_info("%s/%s would change existing job.", j->unit->meta.id, job_type_to_string(j->type));
 
                                 /* Ok, let's get rid of this */
-                                log_debug("Deleting %s/%s to minimize impact.", j->unit->meta.id, job_type_to_string(j->type));
+                                log_info("Deleting %s/%s to minimize impact.", j->unit->meta.id, job_type_to_string(j->type));
 
                                 transaction_delete_job(m, j, true);
                                 again = true;
@@ -1111,7 +1111,7 @@ static int transaction_activate(Manager *m, JobMode mode) {
                         break;
 
                 if (r != -EAGAIN) {
-                        log_debug("Requested transaction contains an unfixable cyclic ordering dependency: %s", strerror(-r));
+                        log_warning("Requested transaction contains an unfixable cyclic ordering dependency: %s", strerror(-r));
                         goto rollback;
                 }
 
@@ -1127,7 +1127,7 @@ static int transaction_activate(Manager *m, JobMode mode) {
                         break;
 
                 if (r != -EAGAIN) {
-                        log_debug("Requested transaction contains unmergable jobs: %s", strerror(-r));
+                        log_warning("Requested transaction contains unmergable jobs: %s", strerror(-r));
                         goto rollback;
                 }
 
@@ -1145,13 +1145,13 @@ static int transaction_activate(Manager *m, JobMode mode) {
         /* Ninth step: check whether we can actually apply this */
         if (mode == JOB_FAIL)
                 if ((r = transaction_is_destructive(m)) < 0) {
-                        log_debug("Requested transaction contradicts existing jobs: %s", strerror(-r));
+                        log_notice("Requested transaction contradicts existing jobs: %s", strerror(-r));
                         goto rollback;
                 }
 
         /* Tenth step: apply changes */
         if ((r = transaction_apply(m)) < 0) {
-                log_debug("Failed to apply transaction: %s", strerror(-r));
+                log_warning("Failed to apply transaction: %s", strerror(-r));
                 goto rollback;
         }
 
@@ -1238,7 +1238,7 @@ void manager_transaction_unlink_job(Manager *m, Job *j, bool delete_dependencies
                 job_dependency_free(j->object_list);
 
                 if (other && delete_dependencies) {
-                        log_debug("Deleting job %s/%s as dependency of job %s/%s",
+                        log_info("Deleting job %s/%s as dependency of job %s/%s",
                                   other->unit->meta.id, job_type_to_string(other->type),
                                   j->unit->meta.id, job_type_to_string(j->type));
                         transaction_delete_job(m, other, delete_dependencies);
index 6abc224..ccc8312 100644 (file)
@@ -2374,7 +2374,7 @@ static void service_timer_event(Unit *u, uint64_t elapsed, Watch* w) {
                 break;
 
         case SERVICE_AUTO_RESTART:
-                log_debug("%s holdoff time over, scheduling restart.", u->meta.id);
+                log_info("%s holdoff time over, scheduling restart.", u->meta.id);
                 service_enter_restart(s);
                 break;
 
index f585e11..75d98c6 100644 (file)
@@ -529,10 +529,10 @@ static DBusHandlerResult wait_filter(DBusConnection *connection, DBusMessage *me
 
         dbus_error_init(&error);
 
-        /* log_debug("Got D-Bus request: %s.%s() on %s", */
-        /*           dbus_message_get_interface(message), */
-        /*           dbus_message_get_member(message), */
-        /*           dbus_message_get_path(message)); */
+        log_debug("Got D-Bus request: %s.%s() on %s",
+                  dbus_message_get_interface(message),
+                  dbus_message_get_member(message),
+                  dbus_message_get_path(message));
 
         if (dbus_message_is_signal(message, DBUS_INTERFACE_LOCAL, "Disconnected")) {
                 log_error("Warning! D-Bus connection terminated.");
@@ -1731,10 +1731,10 @@ static DBusHandlerResult monitor_filter(DBusConnection *connection, DBusMessage
 
         dbus_error_init(&error);
 
-        /* log_debug("Got D-Bus request: %s.%s() on %s", */
-        /*           dbus_message_get_interface(message), */
-        /*           dbus_message_get_member(message), */
-        /*           dbus_message_get_path(message)); */
+        log_debug("Got D-Bus request: %s.%s() on %s",
+                  dbus_message_get_interface(message),
+                  dbus_message_get_member(message),
+                  dbus_message_get_path(message));
 
         if (dbus_message_is_signal(message, DBUS_INTERFACE_LOCAL, "Disconnected")) {
                 log_error("Warning! D-Bus connection terminated.");
index 4810d2b..1874cdf 100644 (file)
@@ -738,7 +738,7 @@ fail:
         u->meta.load_state = UNIT_FAILED;
         unit_add_to_dbus_queue(u);
 
-        log_debug("Failed to load configuration for %s: %s", u->meta.id, strerror(-r));
+        log_notice("Failed to load configuration for %s: %s", u->meta.id, strerror(-r));
 
         return r;
 }
@@ -878,7 +878,7 @@ static void unit_check_uneeded(Unit *u) {
                 if (!UNIT_IS_INACTIVE_OR_DEACTIVATING(unit_active_state(other)))
                         return;
 
-        log_debug("Service %s is not needed anymore. Stopping.", u->meta.id);
+        log_info("Service %s is not needed anymore. Stopping.", u->meta.id);
 
         /* Ok, nobody needs us anymore. Sniff. Then let's commit suicide */
         manager_add_job(u->meta.manager, JOB_STOP, u, JOB_FAIL, true, NULL);