mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 13:47:56 +00:00
init: refine verbosity handling
This patch makes service-announce messages depend on the configured verbosity. It also omits "parent provides" title messages if no new parent services are added during a config update.
This commit is contained in:
parent
30f96657f1
commit
e23fc5a1fc
@ -606,7 +606,8 @@ Genode::Affinity Init::Child::filter_session_affinity(Affinity const &session_af
|
||||
|
||||
void Init::Child::announce_service(Service::Name const &service_name)
|
||||
{
|
||||
log("child \"", name(), "\" announces service \"", service_name, "\"");
|
||||
if (_verbose.enabled())
|
||||
log("child \"", name(), "\" announces service \"", service_name, "\"");
|
||||
|
||||
bool found = false;
|
||||
_child_services.for_each([&] (Routed_service &service) {
|
||||
|
@ -182,8 +182,8 @@ void Init::Main::_update_parent_services_from_config()
|
||||
service.abandon();
|
||||
});
|
||||
|
||||
if (_verbose->enabled())
|
||||
log("parent provides");
|
||||
/* used to prepend the list of new parent services with title */
|
||||
bool first_log = true;
|
||||
|
||||
/* register new services */
|
||||
node.for_each_sub_node("service", [&] (Xml_node service) {
|
||||
@ -197,8 +197,12 @@ void Init::Main::_update_parent_services_from_config()
|
||||
|
||||
if (!registered) {
|
||||
new (_heap) Init::Parent_service(_parent_services, _env, name);
|
||||
if (_verbose->enabled())
|
||||
if (_verbose->enabled()) {
|
||||
if (first_log)
|
||||
log("parent provides");
|
||||
log(" service \"", name, "\"");
|
||||
first_log = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user