Author: lslezak Date: Mon Jul 21 16:23:03 2008 New Revision: 49297 URL: http://svn.opensuse.org/viewcvs/yast?rev=49297&view=rev Log: - decreased logging (y2debug level), don't be too verbose by default Modified: branches/tmp/lslezak/workshop/core/dbus/SCR_service/DBusServer.cc branches/tmp/lslezak/workshop/core/libscr/src/SCR.cc branches/tmp/lslezak/workshop/core/liby2dbus/src/DBusMsg.cc branches/tmp/lslezak/workshop/core/liby2dbus/src/PolKit.cc Modified: branches/tmp/lslezak/workshop/core/dbus/SCR_service/DBusServer.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/workshop/core/dbus/SCR_service/DBusServer.cc?rev=49297&r1=49296&r2=49297&view=diff ============================================================================== --- branches/tmp/lslezak/workshop/core/dbus/SCR_service/DBusServer.cc (original) +++ branches/tmp/lslezak/workshop/core/dbus/SCR_service/DBusServer.cc Mon Jul 21 16:23:03 2008 @@ -97,7 +97,7 @@ // move the current iterator it++; - y2internal("Removing client %s (pid %d) from list", (remove_it->first).c_str(), pid); + y2milestone("Removing client %s (pid %d) from list", (remove_it->first).c_str(), pid); clients.erase(remove_it); } @@ -240,13 +240,13 @@ else #endif { - y2internal("Request from: %s", caller.c_str()); + y2debug("Request from: %s", caller.c_str()); // remember the client if (clients.find(caller) == clients.end()) { // insert the dbus name and PID Clients::value_type new_client(caller, callerPid(caller)); - y2internal("Added new client %s (pid %d)", caller.c_str(), new_client.second); + y2milestone("Added new client %s (pid %d)", caller.c_str(), new_client.second); clients.insert(new_client); } @@ -387,14 +387,14 @@ if (dbus_error_is_set(&error)) { - y2internal("Received an error: %s: %s", error.name, error.message); + y2error("Received an error: %s: %s", error.name, error.message); } dbus_error_free(&error); } else if (request.type() == DBUS_MESSAGE_TYPE_SIGNAL) { - y2internal("Received a signal: interface: %s method: %s", request.interface().c_str(), request.method().c_str()); + y2error("Received a signal: interface: %s method: %s", request.interface().c_str(), request.method().c_str()); } // was a reply set? @@ -476,7 +476,7 @@ dbus_message_iter_init(reply.getMessage(), &iter); int type = dbus_message_iter_get_arg_type(&iter); - y2internal("Message type: %d, %c", type, (char)type); + y2debug("Message type: %d, %c", type, (char)type); if (type == DBUS_TYPE_UINT32) { Modified: branches/tmp/lslezak/workshop/core/libscr/src/SCR.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/workshop/core/libscr/src/SCR.cc?rev=49297&r1=49296&r2=49297&view=diff ============================================================================== --- branches/tmp/lslezak/workshop/core/libscr/src/SCR.cc (original) +++ branches/tmp/lslezak/workshop/core/libscr/src/SCR.cc Mon Jul 21 16:23:03 2008 @@ -80,20 +80,11 @@ // send the message and get the response DBusMsg reply(connection->call(msg)); - y2milestone("Received reply type: %d", reply.type()); + y2debug("Received reply type: %d", reply.type()); // return the first argument from the reply YCPValue ret = reply.getYCPValue(0); - if (!ret.isNull()) - { - y2milestone("Received reply: %s", ret->toString().c_str()); - } - else - { - y2error("Received YCPNull or the value is missing"); - } - // validate the reply (check for exceptions) if (reply.type() != DBUS_MESSAGE_TYPE_METHOD_RETURN) { @@ -110,7 +101,11 @@ if (!ret.isNull()) { - y2milestone("Got reply: %s", ret->toString().c_str()); + y2milestone("Received reply: %s", ret->toString().c_str()); + } + else + { + y2error("Received YCPNull or the value is missing"); } return ret; Modified: branches/tmp/lslezak/workshop/core/liby2dbus/src/DBusMsg.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/workshop/core/liby2dbus/src/DBusMsg.cc?rev=49297&r1=49296&r2=49297&view=diff ============================================================================== --- branches/tmp/lslezak/workshop/core/liby2dbus/src/DBusMsg.cc (original) +++ branches/tmp/lslezak/workshop/core/liby2dbus/src/DBusMsg.cc Mon Jul 21 16:23:03 2008 @@ -210,7 +210,7 @@ return false; } - y2milestone("Adding YCP value: %s", val->toString().c_str()); + y2debug("Adding YCP value: %s", val->toString().c_str()); // create insert iterator DBusMessageIter it; @@ -268,7 +268,7 @@ DBusMessageIter array_it; // open array container - y2milestone("Opening array container"); + y2debug("Opening array container"); dbus_message_iter_open_container(i, DBUS_TYPE_ARRAY, "(bsv)", &array_it); // add the name @@ -276,7 +276,7 @@ while(index < sz) { - y2milestone("Adding YCP value at index %d", index); + y2debug("Adding YCP value at index %d", index); // add an item addYCPValue(term_list->value(index), &array_it); @@ -284,7 +284,7 @@ } // close array container - y2milestone("Closing array container"); + y2debug("Closing array container"); dbus_message_iter_close_container(i, &array_it); } else if (val->isList()) @@ -296,11 +296,11 @@ DBusMessageIter array_it; // open array container - y2milestone("Opening array container"); + y2debug("Opening array container"); dbus_message_iter_open_container(i, DBUS_TYPE_ARRAY, "(bsv)", &array_it); while(index < sz) { - y2milestone("Adding YCP value at index %d", index); + y2debug("Adding YCP value at index %d", index); // add an item addYCPValue(lst->value(index), &array_it); @@ -308,7 +308,7 @@ } // close array container - y2milestone("Closing array container"); + y2debug("Closing array container"); dbus_message_iter_close_container(i, &array_it); } else if (val->isMap()) @@ -318,7 +318,7 @@ DBusMessageIter array_it; // open array container - y2milestone("Opening DICT container"); + y2debug("Opening DICT container"); dbus_message_iter_open_container(i, DBUS_TYPE_ARRAY, "{(bsv)(bsv)}", &array_it); for(YCPMapIterator mit = map.begin(); mit != map.end() ; ++mit) @@ -327,7 +327,7 @@ YCPValue val = mit.value(); DBusMessageIter map_item_it; - y2milestone("Opening map item container"); + y2debug("Opening map item container"); dbus_message_iter_open_container(&array_it, DBUS_TYPE_DICT_ENTRY, 0, &map_item_it); @@ -368,7 +368,7 @@ // create sub iterator for STRUCT container DBusMessageIter sub; - y2milestone("Opening STRUCT container"); + y2debug("Opening STRUCT container"); // open container dbus_message_iter_open_container(i, DBUS_TYPE_STRUCT, NULL, &sub); @@ -376,7 +376,7 @@ dbus_bool_t nil_flag = val.isNull() || val->isVoid(); dbus_message_iter_append_basic(&sub, DBUS_TYPE_BOOLEAN, &nil_flag); - y2milestone("Added nil flag: %s", nil_flag ? "true" : "false"); + y2debug("Added nil flag: %s", nil_flag ? "true" : "false"); if (nil_flag) { @@ -390,9 +390,9 @@ const char *ycp_type = vt.c_str(); dbus_message_iter_append_basic(&sub, DBUS_TYPE_STRING, &ycp_type); - y2milestone("Adding variable type %s: %s", ycp_type, val->toString().c_str()); + y2debug("Adding variable type %s: %s", ycp_type, val->toString().c_str()); - y2milestone("Opening VARIANT container with type %s", typeStr(val)); + y2debug("Opening VARIANT container with type %s", typeStr(val)); // add VARIANT container DBusMessageIter var_it; @@ -401,10 +401,10 @@ // add the raw YCP value addYCPValueRaw(val, &var_it); - y2milestone("Closing VARIANT container"); + y2debug("Closing VARIANT container"); dbus_message_iter_close_container(&sub, &var_it); - y2milestone("Closing STRUCT container"); + y2debug("Closing STRUCT container"); // close container dbus_message_iter_close_container(i, &sub); @@ -472,7 +472,7 @@ ret = YCPPath(s); else if (std::string(ycp_type, 0, block_prefix_len) == block_prefix) { - y2milestone("Found YCP block"); + y2debug("Found YCP block"); if (s == NULL || *s == '\0') { @@ -521,7 +521,7 @@ // DBUS_TYPE_ARRAY is used for YCPList and YCPMap if (ycp_type == "list") { - y2milestone("Found an YCPList container"); + y2debug("Found an YCPList container"); YCPList lst; while (dbus_message_iter_get_arg_type (&sub) != DBUS_TYPE_INVALID) @@ -536,7 +536,7 @@ } else if (ycp_type == "map") { - y2milestone("Found an YCPMap container"); + y2debug("Found an YCPMap container"); YCPMap map; while (dbus_message_iter_get_arg_type (&sub) != DBUS_TYPE_INVALID) @@ -565,7 +565,7 @@ } else if (ycp_type == "term") { - y2milestone("Found an YCPTerm container"); + y2debug("Found an YCPTerm container"); YCPList term_list; std::string term_name; @@ -596,7 +596,7 @@ index++; } - y2milestone("Received TERM: name: %s, list: %s", term_name.c_str(), term_list->toString().c_str()); + y2debug("Received TERM: name: %s, list: %s", term_name.c_str(), term_list->toString().c_str()); YCPTerm term(term_name, term_list); ret = term; @@ -661,7 +661,7 @@ YCPValue DBusMsg::getYCPValue(DBusMessageIter *it) { int type = dbus_message_iter_get_arg_type(it); - y2milestone("Found DBus type: %d (%c)", type, (char)type); + y2debug("Found DBus type: %d (%c)", type, (char)type); if (type != DBUS_TYPE_STRUCT) { @@ -681,11 +681,11 @@ dbus_bool_t b; dbus_message_iter_get_basic(&struct_iter, &b); - y2milestone("Nil flag: %s", b ? "true" : "false"); + y2debug("Nil flag: %s", b ? "true" : "false"); if (b) { - y2milestone("HEADER: Received nil value"); + y2debug("HEADER: Received nil value"); received_nil = true; } } @@ -704,7 +704,7 @@ { const char *str; dbus_message_iter_get_basic(&struct_iter, &str); - y2milestone("HEADER: type: %s", str); + y2debug("HEADER: type: %s", str); ycp_type = str; } else Modified: branches/tmp/lslezak/workshop/core/liby2dbus/src/PolKit.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/workshop/core/liby2dbus/src/PolKit.cc?rev=49297&r1=49296&r2=49297&view=diff ============================================================================== --- branches/tmp/lslezak/workshop/core/liby2dbus/src/PolKit.cc (original) +++ branches/tmp/lslezak/workshop/core/liby2dbus/src/PolKit.cc Mon Jul 21 16:23:03 2008 @@ -103,8 +103,6 @@ { std::string action_id(prefix + "." + method + path); - y2internal("Method: %s", method.c_str()); - // use arg and opt for generic agents (like .target.bash) to allow only some arguments if(::strncmp(path.c_str(), ".target.", ::strlen(".target.")) == 0 || ::strncmp(path.c_str(), ".background.", ::strlen(".background.")) == 0 || -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org