From c6c40ad371bfcc7f9cdc882afb5e6051d12051a4 Mon Sep 17 00:00:00 2001 From: tobexyz <40026159+tobexyz@users.noreply.github.com> Date: Sat, 28 Dec 2024 17:20:31 +0100 Subject: [PATCH] issue #122 changed log level of classes implementing the upnp stack --- .../DefaultUpnpServiceConfiguration.java | 4 +- .../org/fourthline/cling/UpnpServiceImpl.java | 12 ++-- .../annotations/AnnotationActionBinder.java | 2 +- .../AnnotationLocalServiceBinder.java | 2 +- .../AnnotationStateVariableBinder.java | 28 ++++---- ...veringUDA10DeviceDescriptorBinderImpl.java | 6 +- .../xml/UDA10DeviceDescriptorBinderImpl.java | 10 +-- .../UDA10DeviceDescriptorBinderSAXImpl.java | 6 +- .../xml/UDA10ServiceDescriptorBinderImpl.java | 8 +-- .../UDA10ServiceDescriptorBinderSAXImpl.java | 2 +- .../cling/controlpoint/ControlPointImpl.java | 8 +-- .../controlpoint/SubscriptionCallback.java | 28 ++++---- .../cling/model/DefaultServiceManager.java | 18 ++--- .../org/fourthline/cling/model/Namespace.java | 2 +- .../model/action/AbstractActionExecutor.java | 24 +++---- .../model/action/MethodActionExecutor.java | 12 ++-- .../model/gena/LocalGENASubscription.java | 10 +-- .../cling/model/message/UpnpHeaders.java | 22 +++--- .../control/OutgoingActionRequestMessage.java | 4 +- .../model/message/header/CallbackHeader.java | 2 +- .../model/message/header/UpnpHeader.java | 2 +- .../fourthline/cling/model/meta/Device.java | 2 +- .../cling/model/meta/DeviceDetails.java | 4 +- .../cling/protocol/ProtocolFactoryImpl.java | 10 +-- .../cling/protocol/ReceivingAsync.java | 4 +- .../cling/protocol/ReceivingSync.java | 2 +- .../protocol/RetrieveRemoteDescriptors.java | 22 +++--- .../cling/protocol/SendingAsync.java | 2 +- .../protocol/async/ReceivingNotification.java | 16 ++--- .../cling/protocol/async/ReceivingSearch.java | 30 ++++---- .../async/ReceivingSearchResponse.java | 8 +-- .../protocol/async/SendingNotification.java | 2 +- .../async/SendingNotificationAlive.java | 2 +- .../async/SendingNotificationByebye.java | 2 +- .../cling/protocol/async/SendingSearch.java | 6 +- .../cling/protocol/sync/ReceivingAction.java | 16 ++--- .../cling/protocol/sync/ReceivingEvent.java | 16 ++--- .../protocol/sync/ReceivingRetrieval.java | 12 ++-- .../protocol/sync/ReceivingSubscribe.java | 36 +++++----- .../protocol/sync/ReceivingUnsubscribe.java | 12 ++-- .../cling/protocol/sync/SendingAction.java | 30 ++++---- .../cling/protocol/sync/SendingEvent.java | 8 +-- .../cling/protocol/sync/SendingRenewal.java | 10 +-- .../cling/protocol/sync/SendingSubscribe.java | 12 ++-- .../protocol/sync/SendingUnsubscribe.java | 8 +-- .../fourthline/cling/registry/LocalItems.java | 30 ++++---- .../cling/registry/RegistryImpl.java | 36 +++++----- .../cling/registry/RegistryMaintainer.java | 6 +- .../cling/registry/RemoteItems.java | 38 +++++----- .../support/avtransport/callback/Next.java | 2 +- .../support/avtransport/callback/Pause.java | 2 +- .../support/avtransport/callback/Play.java | 2 +- .../avtransport/callback/Previous.java | 2 +- .../support/avtransport/callback/Seek.java | 2 +- .../callback/SetAVTransportURI.java | 4 +- .../avtransport/callback/SetPlayMode.java | 2 +- .../support/avtransport/callback/Stop.java | 2 +- .../avtransport/impl/AVTransportService.java | 4 +- .../impl/state/NoMediaPresent.java | 2 +- .../avtransport/impl/state/PausedPlay.java | 2 +- .../avtransport/impl/state/Playing.java | 2 +- .../avtransport/impl/state/Stopped.java | 2 +- ...stractPeeringConnectionManagerService.java | 12 ++-- .../ConnectionManagerService.java | 4 +- .../support/contentdirectory/DIDLParser.java | 16 ++--- .../contentdirectory/callback/Browse.java | 4 +- .../contentdirectory/callback/Search.java | 4 +- .../support/igd/PortMappingListener.java | 14 ++-- .../support/lastchange/EventedValueURI.java | 2 +- .../support/lastchange/LastChangeParser.java | 14 ++-- .../support/model/dlna/DLNAAttribute.java | 4 +- .../model/dlna/message/DLNAHeaders.java | 16 ++--- .../model/dlna/message/header/DLNAHeader.java | 4 +- .../renderingcontrol/callback/SetMute.java | 2 +- .../renderingcontrol/callback/SetVolume.java | 2 +- .../cling/transport/RouterImpl.java | 58 +++++++-------- .../cling/transport/impl/DatagramIOImpl.java | 20 +++--- .../transport/impl/DatagramProcessorImpl.java | 2 +- .../impl/GENAEventProcessorImpl.java | 6 +- .../transport/impl/MulticastReceiverImpl.java | 18 ++--- .../impl/NetworkAddressFactoryImpl.java | 72 +++++++++---------- .../impl/PullGENAEventProcessorImpl.java | 4 +- .../impl/PullSOAPActionProcessorImpl.java | 6 +- .../impl/SOAPActionProcessorImpl.java | 32 ++++----- .../transport/spi/AbstractStreamClient.java | 12 ++-- .../cling/transport/spi/UpnpStream.java | 4 +- .../StateMachineInvocationHandler.java | 10 +-- .../seamless/xml/CatalogResourceResolver.java | 6 +- .../main/java/org/seamless/xml/DOMParser.java | 6 +- .../main/java/org/seamless/xml/SAXParser.java | 4 +- .../org/seamless/xml/XmlPullParserUtils.java | 2 +- 91 files changed, 492 insertions(+), 492 deletions(-) diff --git a/yaacc/src/main/java/org/fourthline/cling/DefaultUpnpServiceConfiguration.java b/yaacc/src/main/java/org/fourthline/cling/DefaultUpnpServiceConfiguration.java index b3e164f1..ff1c703a 100644 --- a/yaacc/src/main/java/org/fourthline/cling/DefaultUpnpServiceConfiguration.java +++ b/yaacc/src/main/java/org/fourthline/cling/DefaultUpnpServiceConfiguration.java @@ -256,7 +256,7 @@ public NetworkAddressFactory createNetworkAddressFactory() { } public void shutdown() { - Log.d(getClass().getName(), "Shutting down default executor service"); + Log.v(getClass().getName(), "Shutting down default executor service"); getDefaultExecutorService().shutdownNow(); } @@ -305,7 +305,7 @@ public ClingExecutor() { @Override public void rejectedExecution(Runnable runnable, ThreadPoolExecutor threadPoolExecutor) { // Log and discard - Log.i(getClass().getName(), "Thread pool rejected execution of " + runnable.getClass()); + Log.v(getClass().getName(), "Thread pool rejected execution of " + runnable.getClass()); super.rejectedExecution(runnable, threadPoolExecutor); } } diff --git a/yaacc/src/main/java/org/fourthline/cling/UpnpServiceImpl.java b/yaacc/src/main/java/org/fourthline/cling/UpnpServiceImpl.java index 667cfb12..f5df2787 100644 --- a/yaacc/src/main/java/org/fourthline/cling/UpnpServiceImpl.java +++ b/yaacc/src/main/java/org/fourthline/cling/UpnpServiceImpl.java @@ -67,9 +67,9 @@ public UpnpServiceImpl(RegistryListener... registryListeners) { public UpnpServiceImpl(UpnpServiceConfiguration configuration, RegistryListener... registryListeners) { this.configuration = configuration; - Log.i(getClass().getName(), ">>> Starting UPnP service..."); + Log.v(getClass().getName(), ">>> Starting UPnP service..."); - Log.i(getClass().getName(), "Using configuration: " + getConfiguration().getClass().getName()); + Log.v(getClass().getName(), "Using configuration: " + getConfiguration().getClass().getName()); // Instantiation order is important: Router needs to start its network services after registry is ready @@ -90,7 +90,7 @@ public UpnpServiceImpl(UpnpServiceConfiguration configuration, RegistryListener. this.controlPoint = createControlPoint(protocolFactory, registry); - Log.i(getClass().getName(), "<<< UPnP service started successfully"); + Log.v(getClass().getName(), "<<< UPnP service started successfully"); } protected ProtocolFactory createProtocolFactory() { @@ -137,11 +137,11 @@ protected void shutdown(boolean separateThread) { Runnable shutdown = new Runnable() { @Override public void run() { - Log.i(getClass().getName(), ">>> Shutting down UPnP service..."); + Log.v(getClass().getName(), ">>> Shutting down UPnP service..."); shutdownRegistry(); shutdownRouter(); shutdownConfiguration(); - Log.i(getClass().getName(), "<<< UPnP service shutdown completed"); + Log.v(getClass().getName(), "<<< UPnP service shutdown completed"); } }; if (separateThread) { @@ -162,7 +162,7 @@ protected void shutdownRouter() { } catch (RouterException ex) { Throwable cause = Exceptions.unwrap(ex); if (cause instanceof InterruptedException) { - Log.i(getClass().getName(), "Router shutdown was interrupted: " + ex, cause); + Log.v(getClass().getName(), "Router shutdown was interrupted: " + ex, cause); } else { Log.e(getClass().getName(), "Router error on shutdown: " + ex, cause); } diff --git a/yaacc/src/main/java/org/fourthline/cling/binding/annotations/AnnotationActionBinder.java b/yaacc/src/main/java/org/fourthline/cling/binding/annotations/AnnotationActionBinder.java index 1307f6ed..72548d73 100644 --- a/yaacc/src/main/java/org/fourthline/cling/binding/annotations/AnnotationActionBinder.java +++ b/yaacc/src/main/java/org/fourthline/cling/binding/annotations/AnnotationActionBinder.java @@ -83,7 +83,7 @@ public Action appendAction(Map actions) throws LocalServ name = AnnotationLocalServiceBinder.toUpnpActionName(getMethod().getName()); } - Log.d(getClass().getName(), "Creating action and executor: " + name); + Log.v(getClass().getName(), "Creating action and executor: " + name); List inputArguments = createInputArguments(); Map, StateVariableAccessor> outputArguments = createOutputArguments(); diff --git a/yaacc/src/main/java/org/fourthline/cling/binding/annotations/AnnotationLocalServiceBinder.java b/yaacc/src/main/java/org/fourthline/cling/binding/annotations/AnnotationLocalServiceBinder.java index 163289be..fd43f714 100644 --- a/yaacc/src/main/java/org/fourthline/cling/binding/annotations/AnnotationLocalServiceBinder.java +++ b/yaacc/src/main/java/org/fourthline/cling/binding/annotations/AnnotationLocalServiceBinder.java @@ -58,7 +58,7 @@ public class AnnotationLocalServiceBinder implements LocalServiceBinder { public LocalService read(Class clazz) throws LocalServiceBindingException { - Log.d(getClass().getName(), "Reading and binding annotations of service implementation class: " + clazz); + Log.v(getClass().getName(), "Reading and binding annotations of service implementation class: " + clazz); // Read the service ID and service type from the annotation if (clazz.isAnnotationPresent(UpnpService.class)) { diff --git a/yaacc/src/main/java/org/fourthline/cling/binding/annotations/AnnotationStateVariableBinder.java b/yaacc/src/main/java/org/fourthline/cling/binding/annotations/AnnotationStateVariableBinder.java index c5055515..3ed1553a 100644 --- a/yaacc/src/main/java/org/fourthline/cling/binding/annotations/AnnotationStateVariableBinder.java +++ b/yaacc/src/main/java/org/fourthline/cling/binding/annotations/AnnotationStateVariableBinder.java @@ -67,7 +67,7 @@ public Set getStringConvertibleTypes() { protected StateVariable createStateVariable() throws LocalServiceBindingException { - Log.d(getClass().getName(), "Creating state variable '" + getName() + "' with accessor: " + getAccessor()); + Log.v(getClass().getName(), "Creating state variable '" + getName() + "' with accessor: " + getAccessor()); // Datatype Datatype datatype = createDatatype(); @@ -88,7 +88,7 @@ protected StateVariable createStateVariable() throws LocalServiceBindingExceptio } else if (getAccessor() != null && getAccessor().getReturnType().isEnum()) { allowedValues = getAllowedValues(getAccessor().getReturnType()); } else { - Log.d(getClass().getName(), "Not restricting allowed values (of string typed state var): " + getName()); + Log.v(getClass().getName(), "Not restricting allowed values (of string typed state var): " + getName()); } if (allowedValues != null && defaultValue != null) { @@ -122,7 +122,7 @@ protected StateVariable createStateVariable() throws LocalServiceBindingExceptio getAnnotation().allowedValueStep() ); } else { - Log.d(getClass().getName(), "Not restricting allowed value range (of numeric typed state var): " + getName()); + Log.v(getClass().getName(), "Not restricting allowed value range (of numeric typed state var): " + getName()); } // Check if the default value is an allowed value @@ -157,13 +157,13 @@ protected StateVariable createStateVariable() throws LocalServiceBindingExceptio int eventMinimumDelta = 0; if (sendEvents) { if (getAnnotation().eventMaximumRateMilliseconds() > 0) { - Log.d(getClass().getName(), "Moderating state variable events using maximum rate (milliseconds): " + getAnnotation().eventMaximumRateMilliseconds()); + Log.v(getClass().getName(), "Moderating state variable events using maximum rate (milliseconds): " + getAnnotation().eventMaximumRateMilliseconds()); eventMaximumRateMillis = getAnnotation().eventMaximumRateMilliseconds(); } if (getAnnotation().eventMinimumDelta() > 0 && Datatype.Builtin.isNumeric(datatype.getBuiltin())) { // TODO: Doesn't consider floating point types! - Log.d(getClass().getName(), "Moderating state variable events using minimum delta: " + getAnnotation().eventMinimumDelta()); + Log.v(getClass().getName(), "Moderating state variable events using minimum delta: " + getAnnotation().eventMinimumDelta()); eventMinimumDelta = getAnnotation().eventMinimumDelta(); } } @@ -183,16 +183,16 @@ protected Datatype createDatatype() throws LocalServiceBindingException { if (declaredDatatype.length() == 0 && getAccessor() != null) { Class returnType = getAccessor().getReturnType(); - Log.d(getClass().getName(), "Using accessor return type as state variable type: " + returnType); + Log.v(getClass().getName(), "Using accessor return type as state variable type: " + returnType); if (ModelUtil.isStringConvertibleType(getStringConvertibleTypes(), returnType)) { // Enums and toString() convertible types are always state variables with type STRING - Log.d(getClass().getName(), "Return type is string-convertible, using string datatype"); + Log.v(getClass().getName(), "Return type is string-convertible, using string datatype"); return Datatype.Default.STRING.getBuiltinType().getDatatype(); } else { Datatype.Default defaultDatatype = Datatype.Default.getByJavaType(returnType); if (defaultDatatype != null) { - Log.d(getClass().getName(), "Return type has default UPnP datatype: " + defaultDatatype); + Log.v(getClass().getName(), "Return type has default UPnP datatype: " + defaultDatatype); return defaultDatatype.getBuiltinType().getDatatype(); } } @@ -201,7 +201,7 @@ protected Datatype createDatatype() throws LocalServiceBindingException { // We can also guess that if the allowed values are set then it's a string if ((declaredDatatype == null || declaredDatatype.length() == 0) && (getAnnotation().allowedValues().length > 0 || getAnnotation().allowedValuesEnum() != void.class)) { - Log.d(getClass().getName(), "State variable has restricted allowed values, hence using 'string' datatype"); + Log.v(getClass().getName(), "State variable has restricted allowed values, hence using 'string' datatype"); declaredDatatype = "string"; } @@ -210,12 +210,12 @@ protected Datatype createDatatype() throws LocalServiceBindingException { throw new LocalServiceBindingException("Could not detect datatype of state variable: " + getName()); } - Log.d(getClass().getName(), "Trying to find built-in UPnP datatype for detected name: " + declaredDatatype); + Log.v(getClass().getName(), "Trying to find built-in UPnP datatype for detected name: " + declaredDatatype); // Now try to find the actual UPnP datatype by mapping the Default to Builtin Datatype.Builtin builtin = Datatype.Builtin.getByDescriptorName(declaredDatatype); if (builtin != null) { - Log.d(getClass().getName(), "Found built-in UPnP datatype: " + builtin); + Log.v(getClass().getName(), "Found built-in UPnP datatype: " + builtin); return builtin.getDatatype(); } else { // TODO @@ -230,7 +230,7 @@ protected String createDefaultValue(Datatype datatype) throws LocalServiceBindin // The declared default value needs to match the datatype try { datatype.valueOf(getAnnotation().defaultValue()); - Log.d(getClass().getName(), "Found state variable default value: " + getAnnotation().defaultValue()); + Log.v(getClass().getName(), "Found state variable default value: " + getAnnotation().defaultValue()); return getAnnotation().defaultValue(); } catch (Exception ex) { throw new LocalServiceBindingException( @@ -248,7 +248,7 @@ protected String[] getAllowedValues(Class enumType) throws LocalServiceBindingEx throw new LocalServiceBindingException("Allowed values type is not an Enum: " + enumType); } - Log.d(getClass().getName(), "Restricting allowed values of state variable to Enum: " + getName()); + Log.v(getClass().getName(), "Restricting allowed values of state variable to Enum: " + getName()); String[] allowedValueStrings = new String[enumType.getEnumConstants().length]; for (int i = 0; i < enumType.getEnumConstants().length; i++) { Object o = enumType.getEnumConstants()[i]; @@ -257,7 +257,7 @@ protected String[] getAllowedValues(Class enumType) throws LocalServiceBindingEx "Allowed value string (that is, Enum constant name) is longer than 32 characters: " + o.toString() ); } - Log.d(getClass().getName(), "Adding allowed value (converted to string): " + o.toString()); + Log.v(getClass().getName(), "Adding allowed value (converted to string): " + o.toString()); allowedValueStrings[i] = o.toString(); } diff --git a/yaacc/src/main/java/org/fourthline/cling/binding/xml/RecoveringUDA10DeviceDescriptorBinderImpl.java b/yaacc/src/main/java/org/fourthline/cling/binding/xml/RecoveringUDA10DeviceDescriptorBinderImpl.java index d8a0ebd7..03251d0b 100644 --- a/yaacc/src/main/java/org/fourthline/cling/binding/xml/RecoveringUDA10DeviceDescriptorBinderImpl.java +++ b/yaacc/src/main/java/org/fourthline/cling/binding/xml/RecoveringUDA10DeviceDescriptorBinderImpl.java @@ -176,18 +176,18 @@ protected String fixMissingNamespaces(String descriptorXml, DescriptorBindingExc pattern = Pattern.compile("]*)"); matcher = pattern.matcher(descriptorXml); if (!matcher.find() || matcher.groupCount() != 1) { - Log.d(getClass().getName(), "Could not find element attributes"); + Log.v(getClass().getName(), "Could not find element attributes"); return null; } String rootAttributes = matcher.group(1); - Log.d(getClass().getName(), "Preserving existing element attributes/namespace declarations: " + matcher.group(0)); + Log.v(getClass().getName(), "Preserving existing element attributes/namespace declarations: " + matcher.group(0)); // Extract body pattern = Pattern.compile("]*>(.*)", Pattern.DOTALL); matcher = pattern.matcher(descriptorXml); if (!matcher.find() || matcher.groupCount() != 1) { - Log.d(getClass().getName(), "Could not extract body of element"); + Log.v(getClass().getName(), "Could not extract body of element"); return null; } diff --git a/yaacc/src/main/java/org/fourthline/cling/binding/xml/UDA10DeviceDescriptorBinderImpl.java b/yaacc/src/main/java/org/fourthline/cling/binding/xml/UDA10DeviceDescriptorBinderImpl.java index a8a5ced8..53cc0efc 100644 --- a/yaacc/src/main/java/org/fourthline/cling/binding/xml/UDA10DeviceDescriptorBinderImpl.java +++ b/yaacc/src/main/java/org/fourthline/cling/binding/xml/UDA10DeviceDescriptorBinderImpl.java @@ -75,7 +75,7 @@ public D describe(D undescribedDevice, String descriptorXml) } try { - Log.d(getClass().getName(), "Populating device from XML descriptor: " + undescribedDevice); + Log.v(getClass().getName(), "Populating device from XML descriptor: " + undescribedDevice); // We can not validate the XML document. There is no possible XML schema (maybe RELAX NG) that would properly // constrain the UDA 1.0 device descriptor documents: Any unknown element or attribute must be ignored, order of elements // is not guaranteed. Try to write a schema for that! No combination of and @@ -107,7 +107,7 @@ public D describe(D undescribedDevice, String descriptorXml) public D describe(D undescribedDevice, Document dom) throws DescriptorBindingException, ValidationException { try { - Log.d(getClass().getName(), "Populating device from DOM: " + undescribedDevice); + Log.v(getClass().getName(), "Populating device from DOM: " + undescribedDevice); // Read the XML into a mutable descriptor graph MutableDevice descriptor = new MutableDevice(); @@ -250,7 +250,7 @@ public void hydrateDevice(MutableDevice descriptor, Node deviceNode) throws Desc try { descriptor.dlnaDocs.add(DLNADoc.valueOf(txt)); } catch (InvalidValueException ex) { - Log.i(getClass().getName(), "Invalid X_DLNADOC value, ignoring value: " + txt); + Log.v(getClass().getName(), "Invalid X_DLNADOC value, ignoring value: " + txt); } } else if (ELEMENT.X_DLNACAP.equals(deviceNodeChild) && Descriptor.Device.DLNA_PREFIX.equals(deviceNodeChild.getPrefix())) { @@ -390,7 +390,7 @@ public String generate(Device deviceModel, RemoteClientInfo info, Namespace name public Document buildDOM(Device deviceModel, RemoteClientInfo info, Namespace namespace) throws DescriptorBindingException { try { - Log.d(getClass().getName(), "Generating DOM from device model: " + deviceModel); + Log.v(getClass().getName(), "Generating DOM from device model: " + deviceModel); DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setNamespaceAware(true); @@ -604,7 +604,7 @@ static protected URI parseURI(String uri) { at java.net.URI.(URI.java:87) at java.net.URI.create(URI.java:968) */ - Log.d(UDA10DeviceDescriptorBinderImpl.class.getName(), "Illegal URI, trying with ./ prefix: " + Exceptions.unwrap(ex)); + Log.v(UDA10DeviceDescriptorBinderImpl.class.getName(), "Illegal URI, trying with ./ prefix: " + Exceptions.unwrap(ex)); // Ignore } try { diff --git a/yaacc/src/main/java/org/fourthline/cling/binding/xml/UDA10DeviceDescriptorBinderSAXImpl.java b/yaacc/src/main/java/org/fourthline/cling/binding/xml/UDA10DeviceDescriptorBinderSAXImpl.java index 93bb8307..2a109ccb 100644 --- a/yaacc/src/main/java/org/fourthline/cling/binding/xml/UDA10DeviceDescriptorBinderSAXImpl.java +++ b/yaacc/src/main/java/org/fourthline/cling/binding/xml/UDA10DeviceDescriptorBinderSAXImpl.java @@ -59,7 +59,7 @@ public D describe(D undescribedDevice, String descriptorXml) } try { - Log.d(getClass().getName(), "Populating device from XML descriptor: " + undescribedDevice); + Log.v(getClass().getName(), "Populating device from XML descriptor: " + undescribedDevice); // Read the XML into a mutable descriptor graph @@ -234,7 +234,7 @@ public void endElement(ELEMENT element) throws SAXException { try { getInstance().dlnaDocs.add(DLNADoc.valueOf(txt)); } catch (InvalidValueException ex) { - Log.i(getClass().getName(), "Invalid X_DLNADOC value, ignoring value: " + txt); + Log.v(getClass().getName(), "Invalid X_DLNADOC value, ignoring value: " + txt); } break; case X_DLNACAP: @@ -379,7 +379,7 @@ public void endElement(ELEMENT element) throws SAXException { break; } } catch (InvalidValueException ex) { - Log.d(getClass().getName(), + Log.v(getClass().getName(), "UPnP specification violation, skipping invalid service declaration. " + ex.getMessage() ); } diff --git a/yaacc/src/main/java/org/fourthline/cling/binding/xml/UDA10ServiceDescriptorBinderImpl.java b/yaacc/src/main/java/org/fourthline/cling/binding/xml/UDA10ServiceDescriptorBinderImpl.java index 499c844a..c7ee49b6 100644 --- a/yaacc/src/main/java/org/fourthline/cling/binding/xml/UDA10ServiceDescriptorBinderImpl.java +++ b/yaacc/src/main/java/org/fourthline/cling/binding/xml/UDA10ServiceDescriptorBinderImpl.java @@ -69,7 +69,7 @@ public S describe(S undescribedService, String descriptorXml } try { - Log.d(getClass().getName(), "Populating service from XML descriptor: " + undescribedService); + Log.v(getClass().getName(), "Populating service from XML descriptor: " + undescribedService); DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setNamespaceAware(true); @@ -94,7 +94,7 @@ public S describe(S undescribedService, String descriptorXml public S describe(S undescribedService, Document dom) throws DescriptorBindingException, ValidationException { try { - Log.d(getClass().getName(), "Populating service from DOM: " + undescribedService); + Log.v(getClass().getName(), "Populating service from DOM: " + undescribedService); // Read the XML into a mutable descriptor graph MutableService descriptor = new MutableService(); @@ -350,7 +350,7 @@ public void hydrateStateVariable(MutableStateVariable stateVariable, Element sta public String generate(Service service) throws DescriptorBindingException { try { - Log.d(getClass().getName(), "Generating XML descriptor from service model: " + service); + Log.v(getClass().getName(), "Generating XML descriptor from service model: " + service); return XMLUtil.documentToString(buildDOM(service)); @@ -362,7 +362,7 @@ public String generate(Service service) throws DescriptorBindingException { public Document buildDOM(Service service) throws DescriptorBindingException { try { - Log.d(getClass().getName(), "Generating XML descriptor from service model: " + service); + Log.v(getClass().getName(), "Generating XML descriptor from service model: " + service); DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setNamespaceAware(true); diff --git a/yaacc/src/main/java/org/fourthline/cling/binding/xml/UDA10ServiceDescriptorBinderSAXImpl.java b/yaacc/src/main/java/org/fourthline/cling/binding/xml/UDA10ServiceDescriptorBinderSAXImpl.java index cc920614..0d487df8 100644 --- a/yaacc/src/main/java/org/fourthline/cling/binding/xml/UDA10ServiceDescriptorBinderSAXImpl.java +++ b/yaacc/src/main/java/org/fourthline/cling/binding/xml/UDA10ServiceDescriptorBinderSAXImpl.java @@ -57,7 +57,7 @@ public S describe(S undescribedService, String descriptorXml } try { - Log.d(getClass().getName(), "Reading service from XML descriptor"); + Log.v(getClass().getName(), "Reading service from XML descriptor"); SAXParser parser = new SAXParser(); diff --git a/yaacc/src/main/java/org/fourthline/cling/controlpoint/ControlPointImpl.java b/yaacc/src/main/java/org/fourthline/cling/controlpoint/ControlPointImpl.java index 283e0c01..27b654ef 100644 --- a/yaacc/src/main/java/org/fourthline/cling/controlpoint/ControlPointImpl.java +++ b/yaacc/src/main/java/org/fourthline/cling/controlpoint/ControlPointImpl.java @@ -55,7 +55,7 @@ protected ControlPointImpl() { @Inject public ControlPointImpl(UpnpServiceConfiguration configuration, ProtocolFactory protocolFactory, Registry registry) { - Log.d(getClass().getName(), "Creating ControlPoint: " + getClass().getName()); + Log.v(getClass().getName(), "Creating ControlPoint: " + getClass().getName()); this.configuration = configuration; this.protocolFactory = protocolFactory; @@ -91,7 +91,7 @@ public void search(int mxSeconds) { } public void search(UpnpHeader searchType, int mxSeconds) { - Log.d(getClass().getName(), "Sending asynchronous search for: " + searchType.getString()); + Log.v(getClass().getName(), "Sending asynchronous search for: " + searchType.getString()); getConfiguration().getAsyncProtocolExecutor().execute( getProtocolFactory().createSendingSearch(searchType, mxSeconds) ); @@ -102,14 +102,14 @@ public void execute(ExecuteAction executeAction) { } public Future execute(ActionCallback callback) { - Log.d(getClass().getName(), "Invoking action in background: " + callback); + Log.v(getClass().getName(), "Invoking action in background: " + callback); callback.setControlPoint(this); ExecutorService executor = getConfiguration().getSyncProtocolExecutorService(); return executor.submit(callback); } public void execute(SubscriptionCallback callback) { - Log.d(getClass().getName(), "Invoking subscription in background: " + callback); + Log.v(getClass().getName(), "Invoking subscription in background: " + callback); callback.setControlPoint(this); getConfiguration().getSyncProtocolExecutorService().execute(callback); } diff --git a/yaacc/src/main/java/org/fourthline/cling/controlpoint/SubscriptionCallback.java b/yaacc/src/main/java/org/fourthline/cling/controlpoint/SubscriptionCallback.java index ef3e5f47..3b3de141 100644 --- a/yaacc/src/main/java/org/fourthline/cling/controlpoint/SubscriptionCallback.java +++ b/yaacc/src/main/java/org/fourthline/cling/controlpoint/SubscriptionCallback.java @@ -142,7 +142,7 @@ synchronized public void run() { private void establishLocalSubscription(LocalService service) { if (getControlPoint().getRegistry().getLocalDevice(service.getDevice().getIdentity().getUdn(), false) == null) { - Log.d(getClass().getName(), "Local device service is currently not registered, failing subscription immediately"); + Log.v(getClass().getName(), "Local device service is currently not registered, failing subscription immediately"); failed(null, null, new IllegalStateException("Local device is not registered")); return; } @@ -179,29 +179,29 @@ public void ended(CancelReason reason) { public void eventReceived() { synchronized (SubscriptionCallback.this) { - Log.i(getClass().getName(), "Local service state updated, notifying callback, sequence is: " + getCurrentSequence()); + Log.v(getClass().getName(), "Local service state updated, notifying callback, sequence is: " + getCurrentSequence()); SubscriptionCallback.this.eventReceived(this); incrementSequence(); } } }; - Log.i(getClass().getName(), "Local device service is currently registered, also registering subscription"); + Log.v(getClass().getName(), "Local device service is currently registered, also registering subscription"); getControlPoint().getRegistry().addLocalSubscription(localSubscription); - Log.i(getClass().getName(), "Notifying subscription callback of local subscription availablity"); + Log.v(getClass().getName(), "Notifying subscription callback of local subscription availablity"); localSubscription.establish(); - Log.i(getClass().getName(), "Simulating first initial event for local subscription callback, sequence: " + localSubscription.getCurrentSequence()); + Log.v(getClass().getName(), "Simulating first initial event for local subscription callback, sequence: " + localSubscription.getCurrentSequence()); eventReceived(localSubscription); localSubscription.incrementSequence(); - Log.i(getClass().getName(), "Starting to monitor state changes of local service"); + Log.v(getClass().getName(), "Starting to monitor state changes of local service"); localSubscription.registerOnService(); } catch (Exception ex) { - Log.i(getClass().getName(), "Local callback creation failed: " + ex.toString()); - Log.i(getClass().getName(), "Exception root cause: ", Exceptions.unwrap(ex)); + Log.v(getClass().getName(), "Local callback creation failed: " + ex.toString()); + Log.v(getClass().getName(), "Exception root cause: ", Exceptions.unwrap(ex)); if (localSubscription != null) getControlPoint().getRegistry().removeLocalSubscription(localSubscription); failed(localSubscription, null, ex); @@ -272,13 +272,13 @@ synchronized public void end() { } private void endLocalSubscription(LocalGENASubscription subscription) { - Log.d(getClass().getName(), "Removing local subscription and ending it in callback: " + subscription); + Log.v(getClass().getName(), "Removing local subscription and ending it in callback: " + subscription); getControlPoint().getRegistry().removeLocalSubscription(subscription); subscription.end(null); // No reason, on controlpoint request } private void endRemoteSubscription(RemoteGENASubscription subscription) { - Log.d(getClass().getName(), "Ending remote subscription: " + subscription); + Log.v(getClass().getName(), "Ending remote subscription: " + subscription); getControlPoint().getConfiguration().getSyncProtocolExecutorService().execute( getControlPoint().getProtocolFactory().createSendingUnsubscribe(subscription) ); @@ -357,11 +357,11 @@ protected void failed(GENASubscription subscription, UpnpResponse responseStatus */ protected void invalidMessage(RemoteGENASubscription remoteGENASubscription, UnsupportedDataException ex) { - Log.i(getClass().getName(), "Invalid event message received, causing: " + ex); + Log.v(getClass().getName(), "Invalid event message received, causing: " + ex); - Log.d(getClass().getName(), "------------------------------------------------------------------------------"); - Log.d(getClass().getName(), ex.getData() != null ? ex.getData().toString() : "null"); - Log.d(getClass().getName(), "------------------------------------------------------------------------------"); + Log.v(getClass().getName(), "------------------------------------------------------------------------------"); + Log.v(getClass().getName(), ex.getData() != null ? ex.getData().toString() : "null"); + Log.v(getClass().getName(), "------------------------------------------------------------------------------"); } diff --git a/yaacc/src/main/java/org/fourthline/cling/model/DefaultServiceManager.java b/yaacc/src/main/java/org/fourthline/cling/model/DefaultServiceManager.java index ec03414b..15fadcf3 100644 --- a/yaacc/src/main/java/org/fourthline/cling/model/DefaultServiceManager.java +++ b/yaacc/src/main/java/org/fourthline/cling/model/DefaultServiceManager.java @@ -72,7 +72,7 @@ public DefaultServiceManager(LocalService service, Class serviceClass) { protected void lock() { try { if (lock.tryLock(getLockTimeoutMillis(), TimeUnit.MILLISECONDS)) { - Log.i(getClass().getName(), "Acquired lock"); + Log.v(getClass().getName(), "Acquired lock"); } else { throw new RuntimeException("Failed to acquire lock in milliseconds: " + getLockTimeoutMillis()); } @@ -83,7 +83,7 @@ protected void lock() { protected void unlock() { - Log.i(getClass().getName(), "Releasing lock"); + Log.v(getClass().getName(), "Releasing lock"); lock.unlock(); } @@ -134,7 +134,7 @@ public Collection getCurrentState() throws Exception { try { Collection values = readInitialEventedStateVariableValues(); if (values != null) { - Log.d(getClass().getName(), "Obtained initial state variable values for event, skipping individual state variable accessors"); + Log.v(getClass().getName(), "Obtained initial state variable values for event, skipping individual state variable accessors"); return values; } values = new ArrayList<>(); @@ -161,7 +161,7 @@ protected Collection getCurrentState(String[] variableNames) StateVariable stateVariable = getService().getStateVariable(variableName); if (stateVariable == null || !stateVariable.getEventDetails().isSendEvents()) { - Log.d(getClass().getName(), "Ignoring unknown or non-evented state variable: " + variableName); + Log.v(getClass().getName(), "Ignoring unknown or non-evented state variable: " + variableName); continue; } @@ -179,7 +179,7 @@ protected Collection getCurrentState(String[] variableNames) } protected void init() { - Log.d(getClass().getName(), "No service implementation instance available, initializing..."); + Log.v(getClass().getName(), "No service implementation instance available, initializing..."); try { // The actual instance we ware going to use and hold a reference to (1:1 instance for manager) serviceImpl = createServiceInstance(); @@ -201,7 +201,7 @@ protected T createServiceInstance() throws Exception { // Use this constructor if possible return serviceClass.getConstructor(LocalService.class).newInstance(getService()); } catch (NoSuchMethodException ex) { - Log.d(getClass().getName(), "Creating new service implementation instance with no-arg constructor: " + serviceClass.getName()); + Log.v(getClass().getName(), "Creating new service implementation instance with no-arg constructor: " + serviceClass.getName()); return serviceClass.newInstance(); } } @@ -210,10 +210,10 @@ protected PropertyChangeSupport createPropertyChangeSupport(T serviceImpl) throw Method m; if ((m = Reflections.getGetterMethod(serviceImpl.getClass(), "propertyChangeSupport")) != null && PropertyChangeSupport.class.isAssignableFrom(m.getReturnType())) { - Log.d(getClass().getName(), "Service implementation instance offers PropertyChangeSupport, using that: " + serviceImpl.getClass().getName()); + Log.v(getClass().getName(), "Service implementation instance offers PropertyChangeSupport, using that: " + serviceImpl.getClass().getName()); return (PropertyChangeSupport) m.invoke(serviceImpl); } - Log.d(getClass().getName(), "Creating new PropertyChangeSupport for service implementation: " + serviceImpl.getClass().getName()); + Log.v(getClass().getName(), "Creating new PropertyChangeSupport for service implementation: " + serviceImpl.getClass().getName()); return new PropertyChangeSupport(serviceImpl); } @@ -239,7 +239,7 @@ public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals(EVENTED_STATE_VARIABLES)) return; String[] variableNames = ModelUtil.fromCommaSeparatedList(e.getPropertyName()); - Log.d(getClass().getName(), "Changed variable names: " + Arrays.toString(variableNames)); + Log.v(getClass().getName(), "Changed variable names: " + Arrays.toString(variableNames)); try { Collection currentValues = getCurrentState(variableNames); diff --git a/yaacc/src/main/java/org/fourthline/cling/model/Namespace.java b/yaacc/src/main/java/org/fourthline/cling/model/Namespace.java index 6707d94e..73e6c621 100644 --- a/yaacc/src/main/java/org/fourthline/cling/model/Namespace.java +++ b/yaacc/src/main/java/org/fourthline/cling/model/Namespace.java @@ -158,7 +158,7 @@ public Resource[] getResources(Device device) throws ValidationException { Set resources = new HashSet<>(); List errors = new ArrayList<>(); - Log.d(getClass().getName(), "Discovering local resources of device graph"); + Log.v(getClass().getName(), "Discovering local resources of device graph"); Resource[] discoveredResources = device.discoverResources(this); for (Resource resource : discoveredResources) { Log.v(getClass().getName(), "Discovered: " + resource); diff --git a/yaacc/src/main/java/org/fourthline/cling/model/action/AbstractActionExecutor.java b/yaacc/src/main/java/org/fourthline/cling/model/action/AbstractActionExecutor.java index 9729cd00..be1ba367 100644 --- a/yaacc/src/main/java/org/fourthline/cling/model/action/AbstractActionExecutor.java +++ b/yaacc/src/main/java/org/fourthline/cling/model/action/AbstractActionExecutor.java @@ -56,7 +56,7 @@ public Map, StateVariableAccessor> getOutputArgumen */ public void execute(final ActionInvocation actionInvocation) { - Log.d(getClass().getName(), "Invoking on local service: " + actionInvocation); + Log.v(getClass().getName(), "Invoking on local service: " + actionInvocation); final LocalService service = actionInvocation.getAction().getService(); @@ -82,19 +82,19 @@ public String toString() { } catch (ActionException ex) { - Log.d(getClass().getName(), "ActionException thrown by service, wrapping in invocation and returning: " + ex); - Log.d(getClass().getName(), "Exception root cause: ", Exceptions.unwrap(ex)); + Log.v(getClass().getName(), "ActionException thrown by service, wrapping in invocation and returning: " + ex); + Log.v(getClass().getName(), "Exception root cause: ", Exceptions.unwrap(ex)); actionInvocation.setFailure(ex); } catch (InterruptedException ex) { - Log.d(getClass().getName(), "InterruptedException thrown by service, wrapping in invocation and returning: " + ex); - Log.d(getClass().getName(), "Exception root cause: ", Exceptions.unwrap(ex)); + Log.v(getClass().getName(), "InterruptedException thrown by service, wrapping in invocation and returning: " + ex); + Log.v(getClass().getName(), "Exception root cause: ", Exceptions.unwrap(ex)); actionInvocation.setFailure(new ActionCancelledException(ex)); } catch (Throwable t) { Throwable rootCause = Exceptions.unwrap(t); - Log.d(getClass().getName(), "Execution has thrown, wrapping root cause in ActionException and returning: " + t); - Log.d(getClass().getName(), "Exception root cause: ", rootCause); + Log.v(getClass().getName(), "Execution has thrown, wrapping root cause in ActionException and returning: " + t); + Log.v(getClass().getName(), "Exception root cause: ", rootCause); actionInvocation.setFailure( new ActionException( @@ -119,7 +119,7 @@ public String toString() { */ protected Object readOutputArgumentValues(Action action, Object instance) throws Exception { Object[] results = new Object[action.getOutputArguments().length]; - Log.d(getClass().getName(), "Attempting to retrieve output argument values using accessor: " + results.length); + Log.v(getClass().getName(), "Attempting to retrieve output argument values using accessor: " + results.length); int i = 0; for (ActionArgument outputArgument : action.getOutputArguments()) { @@ -127,7 +127,7 @@ protected Object readOutputArgumentValues(Action action, Object in StateVariableAccessor accessor = getOutputArgumentAccessors().get(outputArgument); if (accessor != null) { - Log.d(getClass().getName(), "Calling accessor to read output argument value: " + accessor); + Log.v(getClass().getName(), "Calling accessor to read output argument value: " + accessor); results[i++] = accessor.read(instance); } else { throw new IllegalStateException("No accessor bound for: " + outputArgument); @@ -151,10 +151,10 @@ protected void setOutputArgumentValue(ActionInvocation actionInvoc if (result != null) { try { if (service.isStringConvertibleType(result)) { - Log.d(getClass().getName(), "Result of invocation matches convertible type, setting toString() single output argument value"); + Log.v(getClass().getName(), "Result of invocation matches convertible type, setting toString() single output argument value"); actionInvocation.setOutput(new ActionArgumentValue(argument, result.toString())); } else { - Log.d(getClass().getName(), "Result of invocation is Object, setting single output argument value"); + Log.v(getClass().getName(), "Result of invocation is Object, setting single output argument value"); actionInvocation.setOutput(new ActionArgumentValue(argument, result)); } } catch (InvalidValueException ex) { @@ -166,7 +166,7 @@ protected void setOutputArgumentValue(ActionInvocation actionInvoc } } else { - Log.d(getClass().getName(), "Result of invocation is null, not setting any output argument value(s)"); + Log.v(getClass().getName(), "Result of invocation is null, not setting any output argument value(s)"); } } diff --git a/yaacc/src/main/java/org/fourthline/cling/model/action/MethodActionExecutor.java b/yaacc/src/main/java/org/fourthline/cling/model/action/MethodActionExecutor.java index 925a9ffe..cb126cd0 100644 --- a/yaacc/src/main/java/org/fourthline/cling/model/action/MethodActionExecutor.java +++ b/yaacc/src/main/java/org/fourthline/cling/model/action/MethodActionExecutor.java @@ -67,31 +67,31 @@ protected void execute(ActionInvocation actionInvocation, Object s // Simple case: no output arguments if (!actionInvocation.getAction().hasOutputArguments()) { - Log.d(getClass().getName(), "Calling local service method with no output arguments: " + method); + Log.v(getClass().getName(), "Calling local service method with no output arguments: " + method); Reflections.invoke(method, serviceImpl, inputArgumentValues); return; } boolean isVoid = method.getReturnType().equals(Void.TYPE); - Log.d(getClass().getName(), "Calling local service method with output arguments: " + method); + Log.v(getClass().getName(), "Calling local service method with output arguments: " + method); Object result; boolean isArrayResultProcessed = true; if (isVoid) { - Log.d(getClass().getName(), "Action method is void, calling declared accessors(s) on service instance to retrieve ouput argument(s)"); + Log.v(getClass().getName(), "Action method is void, calling declared accessors(s) on service instance to retrieve ouput argument(s)"); Reflections.invoke(method, serviceImpl, inputArgumentValues); result = readOutputArgumentValues(actionInvocation.getAction(), serviceImpl); } else if (isUseOutputArgumentAccessors(actionInvocation)) { - Log.d(getClass().getName(), "Action method is not void, calling declared accessor(s) on returned instance to retrieve ouput argument(s)"); + Log.v(getClass().getName(), "Action method is not void, calling declared accessor(s) on returned instance to retrieve ouput argument(s)"); Object returnedInstance = Reflections.invoke(method, serviceImpl, inputArgumentValues); result = readOutputArgumentValues(actionInvocation.getAction(), returnedInstance); } else { - Log.d(getClass().getName(), "Action method is not void, using returned value as (single) output argument"); + Log.v(getClass().getName(), "Action method is not void, using returned value as (single) output argument"); result = Reflections.invoke(method, serviceImpl, inputArgumentValues); isArrayResultProcessed = false; // We never want to process e.g. byte[] as individual variable values } @@ -100,7 +100,7 @@ protected void execute(ActionInvocation actionInvocation, Object s if (isArrayResultProcessed && result instanceof Object[]) { Object[] results = (Object[]) result; - Log.d(getClass().getName(), "Accessors returned Object[], setting output argument values: " + results.length); + Log.v(getClass().getName(), "Accessors returned Object[], setting output argument values: " + results.length); for (int i = 0; i < outputArgs.length; i++) { setOutputArgumentValue(actionInvocation, outputArgs[i], results[i]); } diff --git a/yaacc/src/main/java/org/fourthline/cling/model/gena/LocalGENASubscription.java b/yaacc/src/main/java/org/fourthline/cling/model/gena/LocalGENASubscription.java index 0e46d804..145bedc6 100644 --- a/yaacc/src/main/java/org/fourthline/cling/model/gena/LocalGENASubscription.java +++ b/yaacc/src/main/java/org/fourthline/cling/model/gena/LocalGENASubscription.java @@ -73,7 +73,7 @@ public LocalGENASubscription(LocalService service, setSubscriptionDuration(requestedDurationSeconds); - Log.d(getClass().getName(), "Reading initial state of local service at subscription time"); + Log.v(getClass().getName(), "Reading initial state of local service at subscription time"); long currentTime = new Date().getTime(); this.currentValues.clear(); @@ -134,7 +134,7 @@ synchronized public void end(CancelReason reason) { synchronized public void propertyChange(PropertyChangeEvent e) { if (!e.getPropertyName().equals(ServiceManager.EVENTED_STATE_VARIABLES)) return; - Log.d(getClass().getName(), "Eventing triggered, getting state for subscription: " + getSubscriptionId()); + Log.v(getClass().getName(), "Eventing triggered, getting state for subscription: " + getSubscriptionId()); long currentTime = new Date().getTime(); @@ -145,7 +145,7 @@ synchronized public void propertyChange(PropertyChangeEvent e) { for (StateVariableValue newValue : newValues) { String name = newValue.getStateVariable().getName(); if (!excludedVariables.contains(name)) { - Log.d(getClass().getName(), "Adding state variable value to current values of event: " + newValue.getStateVariable() + " = " + newValue); + Log.v(getClass().getName(), "Adding state variable value to current values of event: " + newValue.getStateVariable() + " = " + newValue); currentValues.put(newValue.getStateVariable().getName(), newValue); // Preserve "last sent" state for future moderation @@ -157,13 +157,13 @@ synchronized public void propertyChange(PropertyChangeEvent e) { } if (currentValues.size() > 0) { - Log.d(getClass().getName(), "Propagating new state variable values to subscription: " + this); + Log.v(getClass().getName(), "Propagating new state variable values to subscription: " + this); // TODO: I'm not happy with this design, this dispatches to a separate thread which _then_ // is supposed to lock and read the values off this instance. That obviously doesn't work // so it's currently a hack in SendingEvent.java eventReceived(); } else { - Log.d(getClass().getName(), "No state variable values for event (all moderated out?), not triggering event"); + Log.v(getClass().getName(), "No state variable values for event (all moderated out?), not triggering event"); } } diff --git a/yaacc/src/main/java/org/fourthline/cling/model/message/UpnpHeaders.java b/yaacc/src/main/java/org/fourthline/cling/model/message/UpnpHeaders.java index cc89a9cb..44c22cde 100644 --- a/yaacc/src/main/java/org/fourthline/cling/model/message/UpnpHeaders.java +++ b/yaacc/src/main/java/org/fourthline/cling/model/message/UpnpHeaders.java @@ -54,21 +54,21 @@ public UpnpHeaders(boolean normalizeHeaders) { protected void parseHeaders() { // This runs as late as possible and only when necessary (getter called and map is dirty) parsedHeaders = new LinkedHashMap<>(); - Log.d(getClass().getName(), "Parsing all HTTP headers for known UPnP headers: " + size()); + Log.v(getClass().getName(), "Parsing all HTTP headers for known UPnP headers: " + size()); for (Entry> entry : entrySet()) { if (entry.getKey() == null) continue; // Oh yes, the JDK has 'null' HTTP headers UpnpHeader.Type type = UpnpHeader.Type.getByHttpName(entry.getKey()); if (type == null) { - Log.d(getClass().getName(), "Ignoring non-UPNP HTTP header: " + entry.getKey()); + Log.v(getClass().getName(), "Ignoring non-UPNP HTTP header: " + entry.getKey()); continue; } for (String value : entry.getValue()) { UpnpHeader upnpHeader = UpnpHeader.newInstance(type, value); if (upnpHeader == null || upnpHeader.getValue() == null) { - Log.d(getClass().getName(), + Log.v(getClass().getName(), "Ignoring known but irrelevant header (value violates the UDA specification?) '" + type.getHttpName() + "': " @@ -82,7 +82,7 @@ protected void parseHeaders() { } protected void addParsedValue(UpnpHeader.Type type, UpnpHeader value) { - Log.d(getClass().getName(), "Adding parsed header: " + value); + Log.v(getClass().getName(), "Adding parsed header: " + value); List list = parsedHeaders.get(type); if (list == null) { list = new LinkedList<>(); @@ -168,23 +168,23 @@ public String getFirstHeaderString(UpnpHeader.Type type) { } public void log() { - Log.d(getClass().getName(), "############################ RAW HEADERS ###########################"); + Log.v(getClass().getName(), "############################ RAW HEADERS ###########################"); for (Entry> entry : entrySet()) { - Log.d(getClass().getName(), "=== NAME : " + entry.getKey()); + Log.v(getClass().getName(), "=== NAME : " + entry.getKey()); for (String v : entry.getValue()) { - Log.d(getClass().getName(), "VALUE: " + v); + Log.v(getClass().getName(), "VALUE: " + v); } } if (parsedHeaders != null && parsedHeaders.size() > 0) { - Log.d(getClass().getName(), "########################## PARSED HEADERS ##########################"); + Log.v(getClass().getName(), "########################## PARSED HEADERS ##########################"); for (Map.Entry> entry : parsedHeaders.entrySet()) { - Log.d(getClass().getName(), "=== TYPE: " + entry.getKey()); + Log.v(getClass().getName(), "=== TYPE: " + entry.getKey()); for (UpnpHeader upnpHeader : entry.getValue()) { - Log.d(getClass().getName(), "HEADER: " + upnpHeader); + Log.v(getClass().getName(), "HEADER: " + upnpHeader); } } } - Log.d(getClass().getName(), "####################################################################"); + Log.v(getClass().getName(), "####################################################################"); } diff --git a/yaacc/src/main/java/org/fourthline/cling/model/message/control/OutgoingActionRequestMessage.java b/yaacc/src/main/java/org/fourthline/cling/model/message/control/OutgoingActionRequestMessage.java index 259ae0c3..6fa6a95e 100644 --- a/yaacc/src/main/java/org/fourthline/cling/model/message/control/OutgoingActionRequestMessage.java +++ b/yaacc/src/main/java/org/fourthline/cling/model/message/control/OutgoingActionRequestMessage.java @@ -66,7 +66,7 @@ public OutgoingActionRequestMessage(Action action, UpnpRequest operation) { SoapActionHeader soapActionHeader; if (action instanceof QueryStateVariableAction) { - Log.d(getClass().getName(), "Adding magic control SOAP action header for state variable query action"); + Log.v(getClass().getName(), "Adding magic control SOAP action header for state variable query action"); soapActionHeader = new SoapActionHeader( new SoapActionType( SoapActionType.MAGIC_CONTROL_NS, SoapActionType.MAGIC_CONTROL_TYPE, null, action.getName() @@ -87,7 +87,7 @@ public OutgoingActionRequestMessage(Action action, UpnpRequest operation) { if (getOperation().getMethod().equals(UpnpRequest.Method.POST)) { getHeaders().add(UpnpHeader.Type.SOAPACTION, soapActionHeader); - Log.d(getClass().getName(), "Added SOAP action header: " + soapActionHeader); + Log.v(getClass().getName(), "Added SOAP action header: " + soapActionHeader); /* TODO: Finish the M-POST crap (or not) } else if (getOperation().getMethod().equals(UpnpRequest.Method.MPOST)) { diff --git a/yaacc/src/main/java/org/fourthline/cling/model/message/header/CallbackHeader.java b/yaacc/src/main/java/org/fourthline/cling/model/message/header/CallbackHeader.java index 0010c2cc..d434126b 100644 --- a/yaacc/src/main/java/org/fourthline/cling/model/message/header/CallbackHeader.java +++ b/yaacc/src/main/java/org/fourthline/cling/model/message/header/CallbackHeader.java @@ -61,7 +61,7 @@ public void setString(String s) throws InvalidHeaderException { sp = sp.trim(); if (!sp.startsWith("http://")) { - Log.d(getClass().getName(), "Discarding non-http callback URL: " + sp); + Log.v(getClass().getName(), "Discarding non-http callback URL: " + sp); continue; } diff --git a/yaacc/src/main/java/org/fourthline/cling/model/message/header/UpnpHeader.java b/yaacc/src/main/java/org/fourthline/cling/model/message/header/UpnpHeader.java index 11ce1772..c08ef151 100644 --- a/yaacc/src/main/java/org/fourthline/cling/model/message/header/UpnpHeader.java +++ b/yaacc/src/main/java/org/fourthline/cling/model/message/header/UpnpHeader.java @@ -59,7 +59,7 @@ public static UpnpHeader newInstance(UpnpHeader.Type type, String headerValue) { for (int i = 0; i < type.getHeaderTypes().length && upnpHeader == null; i++) { Class headerClass = type.getHeaderTypes()[i]; try { - Log.d(UpnpHeader.class.getName(), "Trying to parse '" + type + "' with class: " + headerClass.getSimpleName()); + Log.v(UpnpHeader.class.getName(), "Trying to parse '" + type + "' with class: " + headerClass.getSimpleName()); upnpHeader = headerClass.newInstance(); if (headerValue != null) { upnpHeader.setString(headerValue); diff --git a/yaacc/src/main/java/org/fourthline/cling/model/meta/Device.java b/yaacc/src/main/java/org/fourthline/cling/model/meta/Device.java index bab00816..a4fabdc8 100644 --- a/yaacc/src/main/java/org/fourthline/cling/model/meta/Device.java +++ b/yaacc/src/main/java/org/fourthline/cling/model/meta/Device.java @@ -119,7 +119,7 @@ public Device(DI identity, UDAVersion version, DeviceType type, DeviceDetails de if (errors.size() > 0) { for (ValidationError error : errors) { - Log.i(getClass().getName(), error.toString()); + Log.v(getClass().getName(), error.toString()); } throw new ValidationException("Validation of device graph failed, call getErrors() on exception", errors); diff --git a/yaacc/src/main/java/org/fourthline/cling/model/meta/DeviceDetails.java b/yaacc/src/main/java/org/fourthline/cling/model/meta/DeviceDetails.java index ce4c6bbb..db9f41b0 100644 --- a/yaacc/src/main/java/org/fourthline/cling/model/meta/DeviceDetails.java +++ b/yaacc/src/main/java/org/fourthline/cling/model/meta/DeviceDetails.java @@ -203,12 +203,12 @@ public List validate() { if (getUpc() != null) { // This is broken in more than half of the devices I've tested, so let's not even bother with a warning if (getUpc().length() != 12) { - Log.d(getClass().getName(), "UPnP specification violation, UPC must be 12 digits: " + getUpc()); + Log.v(getClass().getName(), "UPnP specification violation, UPC must be 12 digits: " + getUpc()); } else { try { Long.parseLong(getUpc()); } catch (NumberFormatException ex) { - Log.d(getClass().getName(), "UPnP specification violation, UPC must be 12 digits all-numeric: " + getUpc()); + Log.v(getClass().getName(), "UPnP specification violation, UPC must be 12 digits all-numeric: " + getUpc()); } } } diff --git a/yaacc/src/main/java/org/fourthline/cling/protocol/ProtocolFactoryImpl.java b/yaacc/src/main/java/org/fourthline/cling/protocol/ProtocolFactoryImpl.java index 2053e894..3c3b4c2b 100644 --- a/yaacc/src/main/java/org/fourthline/cling/protocol/ProtocolFactoryImpl.java +++ b/yaacc/src/main/java/org/fourthline/cling/protocol/ProtocolFactoryImpl.java @@ -75,7 +75,7 @@ protected ProtocolFactoryImpl() { @Inject public ProtocolFactoryImpl(UpnpService upnpService) { - Log.d(getClass().getName(), "Creating ProtocolFactory: " + getClass().getName()); + Log.v(getClass().getName(), "Creating ProtocolFactory: " + getClass().getName()); this.upnpService = upnpService; } @@ -85,7 +85,7 @@ public UpnpService getUpnpService() { public ReceivingAsync createReceivingAsync(IncomingDatagramMessage message) throws ProtocolCreationException { - Log.i(getClass().getName(), "Creating protocol for incoming asynchronous: " + message); + Log.v(getClass().getName(), "Creating protocol for incoming asynchronous: " + message); if (message.getOperation() instanceof UpnpRequest) { @@ -148,14 +148,14 @@ protected boolean isSupportedServiceAdvertisement(IncomingDatagramMessage messag return true; } } catch (InvalidValueException ex) { - Log.i(getClass().getName(), "Not a named service type header value: " + usnHeader); + Log.v(getClass().getName(), "Not a named service type header value: " + usnHeader); } - Log.i(getClass().getName(), "Service advertisement not supported, dropping it: " + usnHeader); + Log.v(getClass().getName(), "Service advertisement not supported, dropping it: " + usnHeader); return false; } public ReceivingSync createReceivingSync(StreamRequestMessage message) throws ProtocolCreationException { - Log.d(getClass().getName(), "Creating protocol for incoming synchronous: " + message); + Log.v(getClass().getName(), "Creating protocol for incoming synchronous: " + message); if (message.getOperation().getMethod().equals(UpnpRequest.Method.GET)) { diff --git a/yaacc/src/main/java/org/fourthline/cling/protocol/ReceivingAsync.java b/yaacc/src/main/java/org/fourthline/cling/protocol/ReceivingAsync.java index 0b9a19d2..51f21183 100644 --- a/yaacc/src/main/java/org/fourthline/cling/protocol/ReceivingAsync.java +++ b/yaacc/src/main/java/org/fourthline/cling/protocol/ReceivingAsync.java @@ -58,7 +58,7 @@ public void run() { try { proceed = waitBeforeExecution(); } catch (InterruptedException ex) { - Log.i(getClass().getName(), "Protocol wait before execution interrupted (on shutdown?): " + getClass().getSimpleName()); + Log.v(getClass().getName(), "Protocol wait before execution interrupted (on shutdown?): " + getClass().getSimpleName()); proceed = false; } @@ -68,7 +68,7 @@ public void run() { } catch (Exception ex) { Throwable cause = Exceptions.unwrap(ex); if (cause instanceof InterruptedException) { - Log.i(getClass().getName(), "Interrupted protocol '" + getClass().getSimpleName() + "': " + ex, cause); + Log.v(getClass().getName(), "Interrupted protocol '" + getClass().getSimpleName() + "': " + ex, cause); } else { throw new RuntimeException( "Fatal error while executing protocol '" + getClass().getSimpleName() + "': " + ex, ex diff --git a/yaacc/src/main/java/org/fourthline/cling/protocol/ReceivingSync.java b/yaacc/src/main/java/org/fourthline/cling/protocol/ReceivingSync.java index 53bcbdaf..8a06fbb8 100644 --- a/yaacc/src/main/java/org/fourthline/cling/protocol/ReceivingSync.java +++ b/yaacc/src/main/java/org/fourthline/cling/protocol/ReceivingSync.java @@ -61,7 +61,7 @@ final protected void execute() throws RouterException { outputMessage = executeSync(); if (outputMessage != null && getRemoteClientInfo().getExtraResponseHeaders().size() > 0) { - Log.d(getClass().getName(), "Setting extra headers on response message: " + getRemoteClientInfo().getExtraResponseHeaders().size()); + Log.v(getClass().getName(), "Setting extra headers on response message: " + getRemoteClientInfo().getExtraResponseHeaders().size()); outputMessage.getHeaders().putAll(getRemoteClientInfo().getExtraResponseHeaders()); } } diff --git a/yaacc/src/main/java/org/fourthline/cling/protocol/RetrieveRemoteDescriptors.java b/yaacc/src/main/java/org/fourthline/cling/protocol/RetrieveRemoteDescriptors.java index df977065..254eab3f 100644 --- a/yaacc/src/main/java/org/fourthline/cling/protocol/RetrieveRemoteDescriptors.java +++ b/yaacc/src/main/java/org/fourthline/cling/protocol/RetrieveRemoteDescriptors.java @@ -139,7 +139,7 @@ protected void describe() throws RouterException { if (headers != null) deviceDescRetrievalMsg.getHeaders().putAll(headers); - Log.d(getClass().getName(), "Sending device descriptor retrieval message: " + deviceDescRetrievalMsg); + Log.v(getClass().getName(), "Sending device descriptor retrieval message: " + deviceDescRetrievalMsg); deviceDescMsg = getUpnpService().getRouter().send(deviceDescRetrievalMsg); } catch (IllegalArgumentException ex) { @@ -170,7 +170,7 @@ protected void describe() throws RouterException { } if (!deviceDescMsg.isContentTypeTextUDA()) { - Log.d(getClass().getName(), + Log.v(getClass().getName(), "Received device descriptor without or with invalid Content-Type: " + rd.getIdentity().getDescriptorURL()); // We continue despite the invalid UPnP message because we can still hope to convert the content @@ -182,7 +182,7 @@ protected void describe() throws RouterException { return; } - Log.d(getClass().getName(), "Received root device descriptor: " + deviceDescMsg); + Log.v(getClass().getName(), "Received root device descriptor: " + deviceDescMsg); describe(descriptorContent); } @@ -200,10 +200,10 @@ protected void describe(String descriptorXML) throws RouterException { descriptorXML ); - Log.d(getClass().getName(), "Remote device described (without services) notifying listeners: " + describedDevice); + Log.v(getClass().getName(), "Remote device described (without services) notifying listeners: " + describedDevice); notifiedStart = getUpnpService().getRegistry().notifyDiscoveryStart(describedDevice); - Log.d(getClass().getName(), "Hydrating described device's services: " + describedDevice); + Log.v(getClass().getName(), "Hydrating described device's services: " + describedDevice); RemoteDevice hydratedDevice = describeServices(describedDevice); if (hydratedDevice == null) { if (!errorsAlreadyLogged.contains(rd.getIdentity().getUdn())) { @@ -217,7 +217,7 @@ protected void describe(String descriptorXML) throws RouterException { ); return; } else { - Log.d(getClass().getName(), "Adding fully hydrated remote device to registry: " + hydratedDevice); + Log.v(getClass().getName(), "Adding fully hydrated remote device to registry: " + hydratedDevice); // The registry will do the right thing: A new root device is going to be added, if it's // already present or we just received the descriptor again (because we got an embedded // devices' notification), it will simply update the expiration timestamp of the root @@ -317,7 +317,7 @@ protected RemoteService describeService(RemoteService service) if (headers != null) serviceDescRetrievalMsg.getHeaders().putAll(headers); - Log.d(getClass().getName(), "Sending service descriptor retrieval message: " + serviceDescRetrievalMsg); + Log.v(getClass().getName(), "Sending service descriptor retrieval message: " + serviceDescRetrievalMsg); StreamResponseMessage serviceDescMsg = getUpnpService().getRouter().send(serviceDescRetrievalMsg); if (serviceDescMsg == null) { @@ -334,7 +334,7 @@ protected RemoteService describeService(RemoteService service) } if (!serviceDescMsg.isContentTypeTextUDA()) { - Log.d(getClass().getName(), "Received service descriptor without or with invalid Content-Type: " + descriptorURL); + Log.v(getClass().getName(), "Received service descriptor without or with invalid Content-Type: " + descriptorURL); // We continue despite the invalid UPnP message because we can still hope to convert the content } @@ -344,7 +344,7 @@ protected RemoteService describeService(RemoteService service) return null; } - Log.d(getClass().getName(), "Received service descriptor, hydrating service model: " + serviceDescMsg); + Log.v(getClass().getName(), "Received service descriptor, hydrating service model: " + serviceDescMsg); ServiceDescriptorBinder serviceDescriptorBinder = getUpnpService().getConfiguration().getServiceDescriptorBinderUDA10(); @@ -361,10 +361,10 @@ protected List filterExclusiveServices(RemoteService[] services) for (RemoteService discoveredService : services) { for (ServiceType exclusiveType : exclusiveTypes) { if (discoveredService.getServiceType().implementsVersion(exclusiveType)) { - Log.d(getClass().getName(), "Including exclusive service: " + discoveredService); + Log.v(getClass().getName(), "Including exclusive service: " + discoveredService); exclusiveServices.add(discoveredService); } else { - Log.d(getClass().getName(), "Excluding unwanted service: " + exclusiveType); + Log.v(getClass().getName(), "Excluding unwanted service: " + exclusiveType); } } } diff --git a/yaacc/src/main/java/org/fourthline/cling/protocol/SendingAsync.java b/yaacc/src/main/java/org/fourthline/cling/protocol/SendingAsync.java index 60386339..1b62bb64 100644 --- a/yaacc/src/main/java/org/fourthline/cling/protocol/SendingAsync.java +++ b/yaacc/src/main/java/org/fourthline/cling/protocol/SendingAsync.java @@ -53,7 +53,7 @@ public void run() { } catch (Exception ex) { Throwable cause = Exceptions.unwrap(ex); if (cause instanceof InterruptedException) { - Log.d(getClass().getName(), "Interrupted protocol '" + getClass().getSimpleName() + "': " + ex, cause); + Log.v(getClass().getName(), "Interrupted protocol '" + getClass().getSimpleName() + "': " + ex, cause); } else { throw new RuntimeException( "Fatal error while executing protocol '" + getClass().getSimpleName() + "': " + ex, ex diff --git a/yaacc/src/main/java/org/fourthline/cling/protocol/async/ReceivingNotification.java b/yaacc/src/main/java/org/fourthline/cling/protocol/async/ReceivingNotification.java index dd815bc5..8aea954b 100644 --- a/yaacc/src/main/java/org/fourthline/cling/protocol/async/ReceivingNotification.java +++ b/yaacc/src/main/java/org/fourthline/cling/protocol/async/ReceivingNotification.java @@ -80,12 +80,12 @@ protected void execute() throws RouterException { UDN udn = getInputMessage().getUDN(); if (udn == null) { - Log.i(getClass().getName(), "Ignoring notification message without UDN: " + getInputMessage()); + Log.v(getClass().getName(), "Ignoring notification message without UDN: " + getInputMessage()); return; } RemoteDeviceIdentity rdIdentity = new RemoteDeviceIdentity(getInputMessage()); - Log.i(getClass().getName(), "Received device notification: " + rdIdentity); + Log.v(getClass().getName(), "Received device notification: " + rdIdentity); RemoteDevice rd; try { @@ -100,7 +100,7 @@ protected void execute() throws RouterException { if (getInputMessage().isAliveMessage()) { - Log.i(getClass().getName(), "Received device ALIVE advertisement, descriptor location is: " + rdIdentity.getDescriptorURL()); + Log.v(getClass().getName(), "Received device ALIVE advertisement, descriptor location is: " + rdIdentity.getDescriptorURL()); if (rdIdentity.getDescriptorURL() == null) { Log.v(getClass().getName(), "Ignoring message without location URL header: " + getInputMessage()); @@ -108,12 +108,12 @@ protected void execute() throws RouterException { } if (rdIdentity.getMaxAgeSeconds() == null) { - Log.i(getClass().getName(), "Ignoring message without max-age header: " + getInputMessage()); + Log.v(getClass().getName(), "Ignoring message without max-age header: " + getInputMessage()); return; } if (getUpnpService().getRegistry().update(rdIdentity)) { - Log.i(getClass().getName(), "Remote device was already known: " + udn); + Log.v(getClass().getName(), "Remote device was already known: " + udn); return; } @@ -125,14 +125,14 @@ protected void execute() throws RouterException { } else if (getInputMessage().isByeByeMessage()) { - Log.i(getClass().getName(), "Received device BYEBYE advertisement"); + Log.v(getClass().getName(), "Received device BYEBYE advertisement"); boolean removed = getUpnpService().getRegistry().removeDevice(rd); if (removed) { - Log.i(getClass().getName(), "Removed remote device from registry: " + rd); + Log.v(getClass().getName(), "Removed remote device from registry: " + rd); } } else { - Log.i(getClass().getName(), "Ignoring unknown notification message: " + getInputMessage()); + Log.v(getClass().getName(), "Ignoring unknown notification message: " + getInputMessage()); } } diff --git a/yaacc/src/main/java/org/fourthline/cling/protocol/async/ReceivingSearch.java b/yaacc/src/main/java/org/fourthline/cling/protocol/async/ReceivingSearch.java index 0dd36180..6f65d01a 100644 --- a/yaacc/src/main/java/org/fourthline/cling/protocol/async/ReceivingSearch.java +++ b/yaacc/src/main/java/org/fourthline/cling/protocol/async/ReceivingSearch.java @@ -73,29 +73,29 @@ public ReceivingSearch(UpnpService upnpService, IncomingDatagramMessage activeStreamServers = getUpnpService().getRouter().getActiveStreamServers(getInputMessage().getLocalAddress()); if (activeStreamServers.size() == 0) { - Log.d(getClass().getName(), "Aborting search response, no active stream servers found (network disabled?)"); + Log.v(getClass().getName(), "Aborting search response, no active stream servers found (network disabled?)"); return; } @@ -110,7 +110,7 @@ protected boolean waitBeforeExecution() throws InterruptedException { Integer mx = getInputMessage().getMX(); if (mx == null) { - Log.d(getClass().getName(), "Invalid search request, did not contain MX header: " + getInputMessage()); + Log.v(getClass().getName(), "Invalid search request, did not contain MX header: " + getInputMessage()); return false; } @@ -122,7 +122,7 @@ protected boolean waitBeforeExecution() throws InterruptedException { // Only wait if there is something to wait for if (getUpnpService().getRegistry().getLocalDevices().size() > 0) { int sleepTime = randomGenerator.nextInt(mx * 1000); - Log.d(getClass().getName(), "Sleeping " + sleepTime + " milliseconds to avoid flooding with search responses"); + Log.v(getClass().getName(), "Sleeping " + sleepTime + " milliseconds to avoid flooding with search responses"); Thread.sleep(sleepTime); } @@ -156,7 +156,7 @@ protected void sendResponses(UpnpHeader searchTarget, NetworkAddress activeStrea } protected void sendSearchResponseAll(NetworkAddress activeStreamServer) throws RouterException { - Log.d(getClass().getName(), "Responding to 'all' search with advertisement messages for all local devices"); + Log.v(getClass().getName(), "Responding to 'all' search with advertisement messages for all local devices"); for (LocalDevice localDevice : getUpnpService().getRegistry().getLocalDevices()) { @@ -165,7 +165,7 @@ protected void sendSearchResponseAll(NetworkAddress activeStreamServer) throws R // We are re-using the regular notification messages here but override the NT with the ST header - Log.d(getClass().getName(), "Sending root device messages: " + localDevice); + Log.v(getClass().getName(), "Sending root device messages: " + localDevice); List rootDeviceMsgs = createDeviceMessages(localDevice, activeStreamServer); @@ -176,7 +176,7 @@ protected void sendSearchResponseAll(NetworkAddress activeStreamServer) throws R if (localDevice.hasEmbeddedDevices()) { for (LocalDevice embeddedDevice : localDevice.findEmbeddedDevices()) { - Log.d(getClass().getName(), "Sending embedded device messages: " + embeddedDevice); + Log.v(getClass().getName(), "Sending embedded device messages: " + embeddedDevice); List embeddedDeviceMsgs = createDeviceMessages(embeddedDevice, activeStreamServer); @@ -190,7 +190,7 @@ protected void sendSearchResponseAll(NetworkAddress activeStreamServer) throws R createServiceTypeMessages(localDevice, activeStreamServer); if (serviceTypeMsgs.size() > 0) { - Log.d(getClass().getName(), "Sending service type messages"); + Log.v(getClass().getName(), "Sending service type messages"); for (OutgoingSearchResponse upnpMessage : serviceTypeMsgs) { getUpnpService().getRouter().send(upnpMessage); @@ -257,7 +257,7 @@ protected List createServiceTypeMessages(LocalDevice dev } protected void sendSearchResponseRootDevices(NetworkAddress activeStreamServer) throws RouterException { - Log.d(getClass().getName(), "Responding to root device search with advertisement messages for all local root devices"); + Log.v(getClass().getName(), "Responding to root device search with advertisement messages for all local root devices"); for (LocalDevice device : getUpnpService().getRegistry().getLocalDevices()) { if (isAdvertisementDisabled(device)) @@ -281,7 +281,7 @@ protected void sendSearchResponseUDN(UDN udn, NetworkAddress activeStreamServer) if (isAdvertisementDisabled((LocalDevice) device)) return; - Log.d(getClass().getName(), "Responding to UDN device search: " + udn); + Log.v(getClass().getName(), "Responding to UDN device search: " + udn); OutgoingSearchResponse message = new OutgoingSearchResponseUDN( getInputMessage(), @@ -294,7 +294,7 @@ protected void sendSearchResponseUDN(UDN udn, NetworkAddress activeStreamServer) } protected void sendSearchResponseDeviceType(DeviceType deviceType, NetworkAddress activeStreamServer) throws RouterException { - Log.d(getClass().getName(), "Responding to device type search: " + deviceType); + Log.v(getClass().getName(), "Responding to device type search: " + deviceType); Collection> devices = getUpnpService().getRegistry().getDevices(deviceType); for (Device device : devices) { if (device instanceof LocalDevice) { @@ -316,7 +316,7 @@ protected void sendSearchResponseDeviceType(DeviceType deviceType, NetworkAddres } protected void sendSearchResponseServiceType(ServiceType serviceType, NetworkAddress activeStreamServer) throws RouterException { - Log.d(getClass().getName(), "Responding to service type search: " + serviceType); + Log.v(getClass().getName(), "Responding to service type search: " + serviceType); Collection> devices = getUpnpService().getRegistry().getDevices(serviceType); for (Device device : devices) { if (device instanceof LocalDevice) { diff --git a/yaacc/src/main/java/org/fourthline/cling/protocol/async/ReceivingSearchResponse.java b/yaacc/src/main/java/org/fourthline/cling/protocol/async/ReceivingSearchResponse.java index fc1771ee..5644eee1 100644 --- a/yaacc/src/main/java/org/fourthline/cling/protocol/async/ReceivingSearchResponse.java +++ b/yaacc/src/main/java/org/fourthline/cling/protocol/async/ReceivingSearchResponse.java @@ -50,21 +50,21 @@ public ReceivingSearchResponse(UpnpService upnpService, IncomingDatagramMessage< protected void execute() throws RouterException { if (!getInputMessage().isSearchResponseMessage()) { - Log.d(getClass().getName(), "Ignoring invalid search response message: " + getInputMessage()); + Log.v(getClass().getName(), "Ignoring invalid search response message: " + getInputMessage()); return; } UDN udn = getInputMessage().getRootDeviceUDN(); if (udn == null) { - Log.d(getClass().getName(), "Ignoring search response message without UDN: " + getInputMessage()); + Log.v(getClass().getName(), "Ignoring search response message without UDN: " + getInputMessage()); return; } RemoteDeviceIdentity rdIdentity = new RemoteDeviceIdentity(getInputMessage()); - Log.d(getClass().getName(), "Received device search response: " + rdIdentity); + Log.v(getClass().getName(), "Received device search response: " + rdIdentity); if (getUpnpService().getRegistry().update(rdIdentity)) { - Log.d(getClass().getName(), "Remote device was already known: " + udn); + Log.v(getClass().getName(), "Remote device was already known: " + udn); return; } diff --git a/yaacc/src/main/java/org/fourthline/cling/protocol/async/SendingNotification.java b/yaacc/src/main/java/org/fourthline/cling/protocol/async/SendingNotification.java index 0ef537cf..1d67a2e7 100644 --- a/yaacc/src/main/java/org/fourthline/cling/protocol/async/SendingNotification.java +++ b/yaacc/src/main/java/org/fourthline/cling/protocol/async/SendingNotification.java @@ -62,7 +62,7 @@ protected void execute() throws RouterException { List activeStreamServers = getUpnpService().getRouter().getActiveStreamServers(null); if (activeStreamServers.size() == 0) { - Log.d(getClass().getName(), "Aborting notifications, no active stream servers found (network disabled?)"); + Log.v(getClass().getName(), "Aborting notifications, no active stream servers found (network disabled?)"); return; } diff --git a/yaacc/src/main/java/org/fourthline/cling/protocol/async/SendingNotificationAlive.java b/yaacc/src/main/java/org/fourthline/cling/protocol/async/SendingNotificationAlive.java index 5b5caf97..321e7a26 100644 --- a/yaacc/src/main/java/org/fourthline/cling/protocol/async/SendingNotificationAlive.java +++ b/yaacc/src/main/java/org/fourthline/cling/protocol/async/SendingNotificationAlive.java @@ -36,7 +36,7 @@ public SendingNotificationAlive(UpnpService upnpService, LocalDevice device) { @Override protected void execute() throws RouterException { - Log.d(getClass().getName(), "Sending alive messages (" + getBulkRepeat() + " times) for: " + getDevice()); + Log.v(getClass().getName(), "Sending alive messages (" + getBulkRepeat() + " times) for: " + getDevice()); super.execute(); } diff --git a/yaacc/src/main/java/org/fourthline/cling/protocol/async/SendingNotificationByebye.java b/yaacc/src/main/java/org/fourthline/cling/protocol/async/SendingNotificationByebye.java index 583a461e..5d870e9d 100644 --- a/yaacc/src/main/java/org/fourthline/cling/protocol/async/SendingNotificationByebye.java +++ b/yaacc/src/main/java/org/fourthline/cling/protocol/async/SendingNotificationByebye.java @@ -48,7 +48,7 @@ public SendingNotificationByebye(UpnpService upnpService, LocalDevice device) { @Override protected void execute() throws RouterException { - Log.d(getClass().getName(), "Sending byebye messages (" + getBulkRepeat() + " times) for: " + getDevice()); + Log.v(getClass().getName(), "Sending byebye messages (" + getBulkRepeat() + " times) for: " + getDevice()); super.execute(); } diff --git a/yaacc/src/main/java/org/fourthline/cling/protocol/async/SendingSearch.java b/yaacc/src/main/java/org/fourthline/cling/protocol/async/SendingSearch.java index 12c417cb..0045b775 100644 --- a/yaacc/src/main/java/org/fourthline/cling/protocol/async/SendingSearch.java +++ b/yaacc/src/main/java/org/fourthline/cling/protocol/async/SendingSearch.java @@ -78,7 +78,7 @@ public int getMxSeconds() { protected void execute() throws RouterException { - Log.i(getClass().getName(), "Executing search for target: " + searchTarget.getString() + " with MX seconds: " + getMxSeconds()); + Log.v(getClass().getName(), "Executing search for target: " + searchTarget.getString() + " with MX seconds: " + getMxSeconds()); OutgoingSearchRequest msg = new OutgoingSearchRequest(searchTarget, getMxSeconds()); prepareOutgoingSearchRequest(msg); @@ -89,12 +89,12 @@ protected void execute() throws RouterException { getUpnpService().getRouter().send(msg); // UDA 1.0 is silent about this but UDA 1.1 recommends "a few hundred milliseconds" - Log.i(getClass().getName(), "Sleeping " + getBulkIntervalMilliseconds() + " milliseconds"); + Log.v(getClass().getName(), "Sleeping " + getBulkIntervalMilliseconds() + " milliseconds"); Thread.sleep(getBulkIntervalMilliseconds()); } catch (InterruptedException ex) { // Interruption means we stop sending search messages, e.g. on shutdown of thread pool - Log.i(getClass().getName(), "got exception on search", ex); + Log.v(getClass().getName(), "got exception on search", ex); break; } } diff --git a/yaacc/src/main/java/org/fourthline/cling/protocol/sync/ReceivingAction.java b/yaacc/src/main/java/org/fourthline/cling/protocol/sync/ReceivingAction.java index 1cce0edb..0446bcff 100644 --- a/yaacc/src/main/java/org/fourthline/cling/protocol/sync/ReceivingAction.java +++ b/yaacc/src/main/java/org/fourthline/cling/protocol/sync/ReceivingAction.java @@ -75,11 +75,11 @@ protected StreamResponseMessage executeSync() throws RouterException { ); if (resource == null) { - Log.d(getClass().getName(), "No local resource found: " + getInputMessage()); + Log.v(getClass().getName(), "No local resource found: " + getInputMessage()); return null; } - Log.d(getClass().getName(), "Found local action resource matching relative request URI: " + getInputMessage().getUri()); + Log.v(getClass().getName(), "Found local action resource matching relative request URI: " + getInputMessage().getUri()); RemoteActionInvocation invocation; OutgoingActionResponseMessage responseMessage = null; @@ -90,14 +90,14 @@ protected StreamResponseMessage executeSync() throws RouterException { IncomingActionRequestMessage requestMessage = new IncomingActionRequestMessage(getInputMessage(), resource.getModel()); - Log.i(getClass().getName(), "Created incoming action request message: " + requestMessage); + Log.v(getClass().getName(), "Created incoming action request message: " + requestMessage); invocation = new RemoteActionInvocation(requestMessage.getAction(), getRemoteClientInfo()); // Throws UnsupportedDataException if the body can't be read - Log.i(getClass().getName(), "Reading body of request message:" + requestMessage.getBodyString()); + Log.v(getClass().getName(), "Reading body of request message:" + requestMessage.getBodyString()); getUpnpService().getConfiguration().getSoapActionProcessor().readBody(requestMessage, invocation); - Log.i(getClass().getName(), "Executing on local service: " + invocation); + Log.v(getClass().getName(), "Executing on local service: " + invocation); resource.getModel().getExecutor(invocation.getAction()).execute(invocation); if (invocation.getFailure() == null) { @@ -106,7 +106,7 @@ protected StreamResponseMessage executeSync() throws RouterException { } else { if (invocation.getFailure() instanceof ActionCancelledException) { - Log.i(getClass().getName(), "Action execution was cancelled, returning 404 to client"); + Log.v(getClass().getName(), "Action execution was cancelled, returning 404 to client"); // A 404 status is appropriate for this situation: The resource is gone/not available and it's // a temporary condition. Most likely the cancellation happened because the client connection // has been dropped, so it doesn't really matter what we return here anyway. @@ -142,10 +142,10 @@ protected StreamResponseMessage executeSync() throws RouterException { try { - Log.d(getClass().getName(), "Writing body of response message"); + Log.v(getClass().getName(), "Writing body of response message"); getUpnpService().getConfiguration().getSoapActionProcessor().writeBody(responseMessage, invocation); - Log.d(getClass().getName(), "Returning finished response message: " + responseMessage); + Log.v(getClass().getName(), "Returning finished response message: " + responseMessage); return responseMessage; } catch (UnsupportedDataException ex) { diff --git a/yaacc/src/main/java/org/fourthline/cling/protocol/sync/ReceivingEvent.java b/yaacc/src/main/java/org/fourthline/cling/protocol/sync/ReceivingEvent.java index 50c4f0a2..d13e88b3 100644 --- a/yaacc/src/main/java/org/fourthline/cling/protocol/sync/ReceivingEvent.java +++ b/yaacc/src/main/java/org/fourthline/cling/protocol/sync/ReceivingEvent.java @@ -61,7 +61,7 @@ protected OutgoingEventResponseMessage executeSync() throws RouterException { ); if (resource == null) { - Log.d(getClass().getName(), "No local resource found: " + getInputMessage()); + Log.v(getClass().getName(), "No local resource found: " + getInputMessage()); return new OutgoingEventResponseMessage(new UpnpResponse(UpnpResponse.Status.NOT_FOUND)); } @@ -70,22 +70,22 @@ protected OutgoingEventResponseMessage executeSync() throws RouterException { // Error conditions UDA 1.0 section 4.2.1 if (requestMessage.getSubscrptionId() == null) { - Log.d(getClass().getName(), "Subscription ID missing in event request: " + getInputMessage()); + Log.v(getClass().getName(), "Subscription ID missing in event request: " + getInputMessage()); return new OutgoingEventResponseMessage(new UpnpResponse(UpnpResponse.Status.PRECONDITION_FAILED)); } if (!requestMessage.hasValidNotificationHeaders()) { - Log.d(getClass().getName(), "Missing NT and/or NTS headers in event request: " + getInputMessage()); + Log.v(getClass().getName(), "Missing NT and/or NTS headers in event request: " + getInputMessage()); return new OutgoingEventResponseMessage(new UpnpResponse(UpnpResponse.Status.BAD_REQUEST)); } if (!requestMessage.hasValidNotificationHeaders()) { - Log.d(getClass().getName(), "Invalid NT and/or NTS headers in event request: " + getInputMessage()); + Log.v(getClass().getName(), "Invalid NT and/or NTS headers in event request: " + getInputMessage()); return new OutgoingEventResponseMessage(new UpnpResponse(UpnpResponse.Status.PRECONDITION_FAILED)); } if (requestMessage.getSequence() == null) { - Log.d(getClass().getName(), "Sequence missing in event request: " + getInputMessage()); + Log.v(getClass().getName(), "Sequence missing in event request: " + getInputMessage()); return new OutgoingEventResponseMessage(new UpnpResponse(UpnpResponse.Status.PRECONDITION_FAILED)); } @@ -94,7 +94,7 @@ protected OutgoingEventResponseMessage executeSync() throws RouterException { getUpnpService().getConfiguration().getGenaEventProcessor().readBody(requestMessage); } catch (final UnsupportedDataException ex) { - Log.d(getClass().getName(), "Can't read event message request body, " + ex); + Log.v(getClass().getName(), "Can't read event message request body, " + ex); // Pass the parsing failure on to any listeners, so they can take action if necessary final RemoteGENASubscription subscription = @@ -118,14 +118,14 @@ public void run() { getUpnpService().getRegistry().getWaitRemoteSubscription(requestMessage.getSubscrptionId()); if (subscription == null) { - Log.i(getClass().getName(), "Invalid subscription ID, no active subscription: " + requestMessage); + Log.v(getClass().getName(), "Invalid subscription ID, no active subscription: " + requestMessage); return new OutgoingEventResponseMessage(new UpnpResponse(UpnpResponse.Status.PRECONDITION_FAILED)); } getUpnpService().getConfiguration().getRegistryListenerExecutor().execute( new Runnable() { public void run() { - Log.d(getClass().getName(), "Calling active subscription with event state variable values"); + Log.v(getClass().getName(), "Calling active subscription with event state variable values"); subscription.receive( requestMessage.getSequence(), requestMessage.getStateVariableValues() diff --git a/yaacc/src/main/java/org/fourthline/cling/protocol/sync/ReceivingRetrieval.java b/yaacc/src/main/java/org/fourthline/cling/protocol/sync/ReceivingRetrieval.java index bd87fba6..4803227e 100644 --- a/yaacc/src/main/java/org/fourthline/cling/protocol/sync/ReceivingRetrieval.java +++ b/yaacc/src/main/java/org/fourthline/cling/protocol/sync/ReceivingRetrieval.java @@ -63,7 +63,7 @@ public ReceivingRetrieval(UpnpService upnpService, StreamRequestMessage inputMes protected StreamResponseMessage executeSync() throws RouterException { if (!getInputMessage().hasHostHeader()) { - Log.d(getClass().getName(), "Ignoring message, missing HOST header: " + getInputMessage()); + Log.v(getClass().getName(), "Ignoring message, missing HOST header: " + getInputMessage()); return new StreamResponseMessage(new UpnpResponse(UpnpResponse.Status.PRECONDITION_FAILED)); } @@ -74,7 +74,7 @@ protected StreamResponseMessage executeSync() throws RouterException { if (foundResource == null) { foundResource = onResourceNotFound(requestedURI); if (foundResource == null) { - Log.d(getClass().getName(), "No local resource found: " + getInputMessage()); + Log.v(getClass().getName(), "No local resource found: " + getInputMessage()); return null; } } @@ -90,7 +90,7 @@ protected StreamResponseMessage createResponse(URI requestedURI, Resource resour if (DeviceDescriptorResource.class.isAssignableFrom(resource.getClass())) { - Log.d(getClass().getName(), "Found local device matching relative request URI: " + requestedURI); + Log.v(getClass().getName(), "Found local device matching relative request URI: " + requestedURI); LocalDevice device = (LocalDevice) resource.getModel(); DeviceDescriptorBinder deviceDescriptorBinder = @@ -107,7 +107,7 @@ protected StreamResponseMessage createResponse(URI requestedURI, Resource resour } else if (ServiceDescriptorResource.class.isAssignableFrom(resource.getClass())) { - Log.d(getClass().getName(), "Found local service matching relative request URI: " + requestedURI); + Log.v(getClass().getName(), "Found local service matching relative request URI: " + requestedURI); LocalService service = (LocalService) resource.getModel(); ServiceDescriptorBinder serviceDescriptorBinder = @@ -120,13 +120,13 @@ protected StreamResponseMessage createResponse(URI requestedURI, Resource resour } else if (IconResource.class.isAssignableFrom(resource.getClass())) { - Log.d(getClass().getName(), "Found local icon matching relative request URI: " + requestedURI); + Log.v(getClass().getName(), "Found local icon matching relative request URI: " + requestedURI); Icon icon = (Icon) resource.getModel(); response = new StreamResponseMessage(icon.getData(), icon.getMimeType()); } else { - Log.d(getClass().getName(), "Ignoring GET for found local resource: " + resource); + Log.v(getClass().getName(), "Ignoring GET for found local resource: " + resource); return null; } diff --git a/yaacc/src/main/java/org/fourthline/cling/protocol/sync/ReceivingSubscribe.java b/yaacc/src/main/java/org/fourthline/cling/protocol/sync/ReceivingSubscribe.java index 3d843b21..ed7a0e31 100644 --- a/yaacc/src/main/java/org/fourthline/cling/protocol/sync/ReceivingSubscribe.java +++ b/yaacc/src/main/java/org/fourthline/cling/protocol/sync/ReceivingSubscribe.java @@ -72,11 +72,11 @@ protected OutgoingSubscribeResponseMessage executeSync() throws RouterException ); if (resource == null) { - Log.d(getClass().getName(), "No local resource found: " + getInputMessage()); + Log.v(getClass().getName(), "No local resource found: " + getInputMessage()); return null; } - Log.d(getClass().getName(), "Found local event subscription matching relative request URI: " + getInputMessage().getUri()); + Log.v(getClass().getName(), "Found local event subscription matching relative request URI: " + getInputMessage().getUri()); IncomingSubscribeRequestMessage requestMessage = new IncomingSubscribeRequestMessage(getInputMessage(), resource.getModel()); @@ -84,7 +84,7 @@ protected OutgoingSubscribeResponseMessage executeSync() throws RouterException // Error conditions UDA 1.0 section 4.1.1 and 4.1.2 if (requestMessage.getSubscriptionId() != null && (requestMessage.hasNotificationHeader() || requestMessage.getCallbackURLs() != null)) { - Log.d(getClass().getName(), "Subscription ID and NT or Callback in subscribe request: " + getInputMessage()); + Log.v(getClass().getName(), "Subscription ID and NT or Callback in subscribe request: " + getInputMessage()); return new OutgoingSubscribeResponseMessage(UpnpResponse.Status.BAD_REQUEST); } @@ -93,7 +93,7 @@ protected OutgoingSubscribeResponseMessage executeSync() throws RouterException } else if (requestMessage.hasNotificationHeader() && requestMessage.getCallbackURLs() != null) { return processNewSubscription(resource.getModel(), requestMessage); } else { - Log.d(getClass().getName(), "No subscription ID, no NT or Callback, neither subscription or renewal: " + getInputMessage()); + Log.v(getClass().getName(), "No subscription ID, no NT or Callback, neither subscription or renewal: " + getInputMessage()); return new OutgoingSubscribeResponseMessage(UpnpResponse.Status.PRECONDITION_FAILED); } @@ -106,16 +106,16 @@ protected OutgoingSubscribeResponseMessage processRenewal(LocalService service, // Error conditions UDA 1.0 section 4.1.1 and 4.1.2 if (subscription == null) { - Log.d(getClass().getName(), "Invalid subscription ID for renewal request: " + getInputMessage()); + Log.v(getClass().getName(), "Invalid subscription ID for renewal request: " + getInputMessage()); return new OutgoingSubscribeResponseMessage(UpnpResponse.Status.PRECONDITION_FAILED); } - Log.d(getClass().getName(), "Renewing subscription: " + subscription); + Log.v(getClass().getName(), "Renewing subscription: " + subscription); subscription.setSubscriptionDuration(requestMessage.getRequestedTimeoutSeconds()); if (getUpnpService().getRegistry().updateLocalSubscription(subscription)) { return new OutgoingSubscribeResponseMessage(subscription); } else { - Log.d(getClass().getName(), "Subscription went away before it could be renewed: " + getInputMessage()); + Log.v(getClass().getName(), "Subscription went away before it could be renewed: " + getInputMessage()); return new OutgoingSubscribeResponseMessage(UpnpResponse.Status.PRECONDITION_FAILED); } } @@ -126,12 +126,12 @@ protected OutgoingSubscribeResponseMessage processNewSubscription(LocalService s // Error conditions UDA 1.0 section 4.1.1 and 4.1.2 if (callbackURLs == null || callbackURLs.size() == 0) { - Log.d(getClass().getName(), "Missing or invalid Callback URLs in subscribe request: " + getInputMessage()); + Log.v(getClass().getName(), "Missing or invalid Callback URLs in subscribe request: " + getInputMessage()); return new OutgoingSubscribeResponseMessage(UpnpResponse.Status.PRECONDITION_FAILED); } if (!requestMessage.hasNotificationHeader()) { - Log.d(getClass().getName(), "Missing or invalid NT header in subscribe request: " + getInputMessage()); + Log.v(getClass().getName(), "Missing or invalid NT header in subscribe request: " + getInputMessage()); return new OutgoingSubscribeResponseMessage(UpnpResponse.Status.PRECONDITION_FAILED); } @@ -162,10 +162,10 @@ public void eventReceived() { return new OutgoingSubscribeResponseMessage(UpnpResponse.Status.INTERNAL_SERVER_ERROR); } - Log.d(getClass().getName(), "Adding subscription to registry: " + subscription); + Log.v(getClass().getName(), "Adding subscription to registry: " + subscription); getUpnpService().getRegistry().addLocalSubscription(subscription); - Log.d(getClass().getName(), "Returning subscription response, waiting to send initial event"); + Log.v(getClass().getName(), "Returning subscription response, waiting to send initial event"); return new OutgoingSubscribeResponseMessage(subscription); } @@ -181,23 +181,23 @@ public void responseSent(StreamResponseMessage responseMessage) { // event message arrives later than the first on-change event message. Shouldn't be a problem as the // subscriber is supposed to figure out what to do with out-of-sequence messages. I would be // surprised though if actual implementations won't crash! - Log.d(getClass().getName(), "Establishing subscription"); + Log.v(getClass().getName(), "Establishing subscription"); subscription.registerOnService(); subscription.establish(); - Log.d(getClass().getName(), "Response to subscription sent successfully, now sending initial event asynchronously"); + Log.v(getClass().getName(), "Response to subscription sent successfully, now sending initial event asynchronously"); getUpnpService().getConfiguration().getAsyncProtocolExecutor().execute( getUpnpService().getProtocolFactory().createSendingEvent(subscription) ); } else if (subscription.getCurrentSequence().getValue() == 0) { - Log.d(getClass().getName(), "Subscription request's response aborted, not sending initial event"); + Log.v(getClass().getName(), "Subscription request's response aborted, not sending initial event"); if (responseMessage == null) { - Log.d(getClass().getName(), "Reason: No response at all from subscriber"); + Log.v(getClass().getName(), "Reason: No response at all from subscriber"); } else { - Log.d(getClass().getName(), "Reason: " + responseMessage.getOperation()); + Log.v(getClass().getName(), "Reason: " + responseMessage.getOperation()); } - Log.d(getClass().getName(), "Removing subscription from registry: " + subscription); + Log.v(getClass().getName(), "Removing subscription from registry: " + subscription); getUpnpService().getRegistry().removeLocalSubscription(subscription); } } @@ -205,7 +205,7 @@ public void responseSent(StreamResponseMessage responseMessage) { @Override public void responseException(Throwable t) { if (subscription == null) return; // Nothing to do, we didn't get that far - Log.d(getClass().getName(), "Response could not be send to subscriber, removing local GENA subscription: " + subscription); + Log.v(getClass().getName(), "Response could not be send to subscriber, removing local GENA subscription: " + subscription); getUpnpService().getRegistry().removeLocalSubscription(subscription); } } \ No newline at end of file diff --git a/yaacc/src/main/java/org/fourthline/cling/protocol/sync/ReceivingUnsubscribe.java b/yaacc/src/main/java/org/fourthline/cling/protocol/sync/ReceivingUnsubscribe.java index 5126488e..0e92ded9 100644 --- a/yaacc/src/main/java/org/fourthline/cling/protocol/sync/ReceivingUnsubscribe.java +++ b/yaacc/src/main/java/org/fourthline/cling/protocol/sync/ReceivingUnsubscribe.java @@ -48,11 +48,11 @@ protected StreamResponseMessage executeSync() throws RouterException { ); if (resource == null) { - Log.d(getClass().getName(), "No local resource found: " + getInputMessage()); + Log.v(getClass().getName(), "No local resource found: " + getInputMessage()); return null; } - Log.d(getClass().getName(), "Found local event subscription matching relative request URI: " + getInputMessage().getUri()); + Log.v(getClass().getName(), "Found local event subscription matching relative request URI: " + getInputMessage().getUri()); IncomingUnsubscribeRequestMessage requestMessage = new IncomingUnsubscribeRequestMessage(getInputMessage(), resource.getModel()); @@ -60,7 +60,7 @@ protected StreamResponseMessage executeSync() throws RouterException { // Error conditions UDA 1.0 section 4.1.3 if (requestMessage.getSubscriptionId() != null && (requestMessage.hasNotificationHeader() || requestMessage.hasCallbackHeader())) { - Log.d(getClass().getName(), "Subscription ID and NT or Callback in unsubcribe request: " + getInputMessage()); + Log.v(getClass().getName(), "Subscription ID and NT or Callback in unsubcribe request: " + getInputMessage()); return new StreamResponseMessage(UpnpResponse.Status.BAD_REQUEST); } @@ -68,15 +68,15 @@ protected StreamResponseMessage executeSync() throws RouterException { getUpnpService().getRegistry().getLocalSubscription(requestMessage.getSubscriptionId()); if (subscription == null) { - Log.d(getClass().getName(), "Invalid subscription ID for unsubscribe request: " + getInputMessage()); + Log.v(getClass().getName(), "Invalid subscription ID for unsubscribe request: " + getInputMessage()); return new StreamResponseMessage(UpnpResponse.Status.PRECONDITION_FAILED); } - Log.d(getClass().getName(), "Unregistering subscription: " + subscription); + Log.v(getClass().getName(), "Unregistering subscription: " + subscription); if (getUpnpService().getRegistry().removeLocalSubscription(subscription)) { subscription.end(null); // No reason, just an unsubscribe } else { - Log.d(getClass().getName(), "Subscription was already removed from registry"); + Log.v(getClass().getName(), "Subscription was already removed from registry"); } return new StreamResponseMessage(UpnpResponse.Status.OK); diff --git a/yaacc/src/main/java/org/fourthline/cling/protocol/sync/SendingAction.java b/yaacc/src/main/java/org/fourthline/cling/protocol/sync/SendingAction.java index 669edbcd..b307585e 100644 --- a/yaacc/src/main/java/org/fourthline/cling/protocol/sync/SendingAction.java +++ b/yaacc/src/main/java/org/fourthline/cling/protocol/sync/SendingAction.java @@ -64,14 +64,14 @@ protected IncomingActionResponseMessage executeSync() throws RouterException { protected IncomingActionResponseMessage invokeRemote(OutgoingActionRequestMessage requestMessage) throws RouterException { Device device = actionInvocation.getAction().getService().getDevice(); - Log.d(getClass().getName(), "Sending outgoing action call '" + actionInvocation.getAction().getName() + "' to remote service of: " + device); + Log.v(getClass().getName(), "Sending outgoing action call '" + actionInvocation.getAction().getName() + "' to remote service of: " + device); IncomingActionResponseMessage responseMessage = null; try { StreamResponseMessage streamResponse = sendRemoteRequest(requestMessage); if (streamResponse == null) { - Log.d(getClass().getName(), "No connection or no no response received, returning null"); + Log.v(getClass().getName(), "No connection or no no response received, returning null"); actionInvocation.setFailure(new ActionException(ErrorCode.ACTION_FAILED, "Connection error or no response received")); return null; } @@ -79,7 +79,7 @@ protected IncomingActionResponseMessage invokeRemote(OutgoingActionRequestMessag responseMessage = new IncomingActionResponseMessage(streamResponse); if (responseMessage.isFailedNonRecoverable()) { - Log.d(getClass().getName(), "Response was a non-recoverable failure: " + responseMessage); + Log.v(getClass().getName(), "Response was a non-recoverable failure: " + responseMessage); throw new ActionException( ErrorCode.ACTION_FAILED, "Non-recoverable remote execution failure: " + responseMessage.getOperation().getResponseDetails() ); @@ -93,7 +93,7 @@ protected IncomingActionResponseMessage invokeRemote(OutgoingActionRequestMessag } catch (ActionException ex) { - Log.d(getClass().getName(), "Remote action invocation failed, returning Internal Server Error message: " + ex.getMessage()); + Log.v(getClass().getName(), "Remote action invocation failed, returning Internal Server Error message: " + ex.getMessage()); actionInvocation.setFailure(ex); if (responseMessage == null || !responseMessage.getOperation().isFailed()) { return new IncomingActionResponseMessage(new UpnpResponse(UpnpResponse.Status.INTERNAL_SERVER_ERROR)); @@ -107,22 +107,22 @@ protected StreamResponseMessage sendRemoteRequest(OutgoingActionRequestMessage r throws ActionException, RouterException { try { - Log.d(getClass().getName(), "Writing SOAP request body of: " + requestMessage); + Log.v(getClass().getName(), "Writing SOAP request body of: " + requestMessage); getUpnpService().getConfiguration().getSoapActionProcessor().writeBody(requestMessage, actionInvocation); - Log.d(getClass().getName(), "Sending SOAP body of message as stream to remote device"); + Log.v(getClass().getName(), "Sending SOAP body of message as stream to remote device"); return getUpnpService().getRouter().send(requestMessage); } catch (RouterException ex) { Throwable cause = Exceptions.unwrap(ex); if (cause instanceof InterruptedException) { - Log.d(getClass().getName(), "Sending action request message was interrupted: " + cause); + Log.v(getClass().getName(), "Sending action request message was interrupted: " + cause); throw new ActionCancelledException((InterruptedException) cause); } throw ex; } catch (UnsupportedDataException ex) { - Log.d(getClass().getName(), "Error writing SOAP body: " + ex); - Log.d(getClass().getName(), "Exception root cause: ", Exceptions.unwrap(ex)); + Log.v(getClass().getName(), "Error writing SOAP body: " + ex); + Log.v(getClass().getName(), "Exception root cause: ", Exceptions.unwrap(ex)); throw new ActionException(ErrorCode.ACTION_FAILED, "Error writing request message. " + ex.getMessage()); } @@ -131,11 +131,11 @@ protected StreamResponseMessage sendRemoteRequest(OutgoingActionRequestMessage r protected void handleResponse(IncomingActionResponseMessage responseMsg) throws ActionException { try { - Log.d(getClass().getName(), "Received response for outgoing call, reading SOAP response body: " + responseMsg); + Log.v(getClass().getName(), "Received response for outgoing call, reading SOAP response body: " + responseMsg); getUpnpService().getConfiguration().getSoapActionProcessor().readBody(responseMsg, actionInvocation); } catch (UnsupportedDataException ex) { - Log.d(getClass().getName(), "Error reading SOAP body: " + ex); - Log.d(getClass().getName(), "Exception root cause: ", Exceptions.unwrap(ex)); + Log.v(getClass().getName(), "Error reading SOAP body: " + ex); + Log.v(getClass().getName(), "Exception root cause: ", Exceptions.unwrap(ex)); throw new ActionException( ErrorCode.ACTION_FAILED, "Error reading SOAP response message. " + ex.getMessage(), @@ -147,11 +147,11 @@ protected void handleResponse(IncomingActionResponseMessage responseMsg) throws protected void handleResponseFailure(IncomingActionResponseMessage responseMsg) throws ActionException { try { - Log.d(getClass().getName(), "Received response with Internal Server Error, reading SOAP failure message"); + Log.v(getClass().getName(), "Received response with Internal Server Error, reading SOAP failure message"); getUpnpService().getConfiguration().getSoapActionProcessor().readBody(responseMsg, actionInvocation); } catch (UnsupportedDataException ex) { - Log.d(getClass().getName(), "Error reading SOAP body: " + ex); - Log.d(getClass().getName(), "Exception root cause: ", Exceptions.unwrap(ex)); + Log.v(getClass().getName(), "Error reading SOAP body: " + ex); + Log.v(getClass().getName(), "Exception root cause: ", Exceptions.unwrap(ex)); throw new ActionException( ErrorCode.ACTION_FAILED, "Error reading SOAP response failure message. " + ex.getMessage(), diff --git a/yaacc/src/main/java/org/fourthline/cling/protocol/sync/SendingEvent.java b/yaacc/src/main/java/org/fourthline/cling/protocol/sync/SendingEvent.java index fe11ae13..6499eda5 100644 --- a/yaacc/src/main/java/org/fourthline/cling/protocol/sync/SendingEvent.java +++ b/yaacc/src/main/java/org/fourthline/cling/protocol/sync/SendingEvent.java @@ -69,22 +69,22 @@ public SendingEvent(UpnpService upnpService, LocalGENASubscription subscription) protected StreamResponseMessage executeSync() throws RouterException { - Log.d(getClass().getName(), "Sending event for subscription: " + subscriptionId); + Log.v(getClass().getName(), "Sending event for subscription: " + subscriptionId); StreamResponseMessage lastResponse = null; for (OutgoingEventRequestMessage requestMessage : requestMessages) { if (currentSequence.getValue() == 0) { - Log.d(getClass().getName(), "Sending initial event message to callback URL: " + requestMessage.getUri()); + Log.v(getClass().getName(), "Sending initial event message to callback URL: " + requestMessage.getUri()); } else { - Log.d(getClass().getName(), "Sending event message '" + currentSequence + "' to callback URL: " + requestMessage.getUri()); + Log.v(getClass().getName(), "Sending event message '" + currentSequence + "' to callback URL: " + requestMessage.getUri()); } // Send request lastResponse = getUpnpService().getRouter().send(requestMessage); - Log.d(getClass().getName(), "Received event callback response: " + lastResponse); + Log.v(getClass().getName(), "Received event callback response: " + lastResponse); } diff --git a/yaacc/src/main/java/org/fourthline/cling/protocol/sync/SendingRenewal.java b/yaacc/src/main/java/org/fourthline/cling/protocol/sync/SendingRenewal.java index 9d54164b..ab6adeed 100644 --- a/yaacc/src/main/java/org/fourthline/cling/protocol/sync/SendingRenewal.java +++ b/yaacc/src/main/java/org/fourthline/cling/protocol/sync/SendingRenewal.java @@ -56,7 +56,7 @@ public SendingRenewal(UpnpService upnpService, RemoteGENASubscription subscripti } protected IncomingSubscribeResponseMessage executeSync() throws RouterException { - Log.d(getClass().getName(), "Sending subscription renewal request: " + getInputMessage()); + Log.v(getClass().getName(), "Sending subscription renewal request: " + getInputMessage()); StreamResponseMessage response; try { @@ -74,7 +74,7 @@ protected IncomingSubscribeResponseMessage executeSync() throws RouterException final IncomingSubscribeResponseMessage responseMessage = new IncomingSubscribeResponseMessage(response); if (response.getOperation().isFailed()) { - Log.d(getClass().getName(), "Subscription renewal failed, response was: " + response); + Log.v(getClass().getName(), "Subscription renewal failed, response was: " + response); getUpnpService().getRegistry().removeRemoteSubscription(subscription); getUpnpService().getConfiguration().getRegistryListenerExecutor().execute( new Runnable() { @@ -84,7 +84,7 @@ public void run() { } ); } else if (!responseMessage.isValidHeaders()) { - Log.i(getClass().getName(), "Subscription renewal failed, invalid or missing (SID, Timeout) response headers"); + Log.v(getClass().getName(), "Subscription renewal failed, invalid or missing (SID, Timeout) response headers"); getUpnpService().getConfiguration().getRegistryListenerExecutor().execute( new Runnable() { public void run() { @@ -93,7 +93,7 @@ public void run() { } ); } else { - Log.d(getClass().getName(), "Subscription renewed, updating in registry, response was: " + response); + Log.v(getClass().getName(), "Subscription renewed, updating in registry, response was: " + response); subscription.setActualSubscriptionDurationSeconds(responseMessage.getSubscriptionDurationSeconds()); getUpnpService().getRegistry().updateRemoteSubscription(subscription); } @@ -102,7 +102,7 @@ public void run() { } protected void onRenewalFailure() { - Log.d(getClass().getName(), "Subscription renewal failed, removing subscription from registry"); + Log.v(getClass().getName(), "Subscription renewal failed, removing subscription from registry"); getUpnpService().getRegistry().removeRemoteSubscription(subscription); getUpnpService().getConfiguration().getRegistryListenerExecutor().execute( new Runnable() { diff --git a/yaacc/src/main/java/org/fourthline/cling/protocol/sync/SendingSubscribe.java b/yaacc/src/main/java/org/fourthline/cling/protocol/sync/SendingSubscribe.java index 258ad8fb..949446e7 100644 --- a/yaacc/src/main/java/org/fourthline/cling/protocol/sync/SendingSubscribe.java +++ b/yaacc/src/main/java/org/fourthline/cling/protocol/sync/SendingSubscribe.java @@ -70,7 +70,7 @@ public SendingSubscribe(UpnpService upnpService, protected IncomingSubscribeResponseMessage executeSync() throws RouterException { if (!getInputMessage().hasCallbackURLs()) { - Log.d(getClass().getName(), "Subscription failed, no active local callback URLs available (network disabled?)"); + Log.v(getClass().getName(), "Subscription failed, no active local callback URLs available (network disabled?)"); getUpnpService().getConfiguration().getRegistryListenerExecutor().execute( new Runnable() { public void run() { @@ -81,7 +81,7 @@ public void run() { return null; } - Log.d(getClass().getName(), "Sending subscription request: " + getInputMessage()); + Log.v(getClass().getName(), "Sending subscription request: " + getInputMessage()); try { // register this pending Subscription to bloc if the notification is received before the @@ -104,7 +104,7 @@ public void run() { final IncomingSubscribeResponseMessage responseMessage = new IncomingSubscribeResponseMessage(response); if (response.getOperation().isFailed()) { - Log.d(getClass().getName(), "Subscription failed, response was: " + responseMessage); + Log.v(getClass().getName(), "Subscription failed, response was: " + responseMessage); getUpnpService().getConfiguration().getRegistryListenerExecutor().execute( new Runnable() { public void run() { @@ -113,7 +113,7 @@ public void run() { } ); } else if (!responseMessage.isValidHeaders()) { - Log.i(getClass().getName(), "Subscription failed, invalid or missing (SID, Timeout) response headers"); + Log.v(getClass().getName(), "Subscription failed, invalid or missing (SID, Timeout) response headers"); getUpnpService().getConfiguration().getRegistryListenerExecutor().execute( new Runnable() { public void run() { @@ -123,7 +123,7 @@ public void run() { ); } else { - Log.d(getClass().getName(), "Subscription established, adding to registry, response was: " + response); + Log.v(getClass().getName(), "Subscription established, adding to registry, response was: " + response); subscription.setSubscriptionId(responseMessage.getSubscriptionId()); subscription.setActualSubscriptionDurationSeconds(responseMessage.getSubscriptionDurationSeconds()); @@ -145,7 +145,7 @@ public void run() { } protected void onSubscriptionFailure() { - Log.d(getClass().getName(), "Subscription failed"); + Log.v(getClass().getName(), "Subscription failed"); getUpnpService().getConfiguration().getRegistryListenerExecutor().execute( new Runnable() { public void run() { diff --git a/yaacc/src/main/java/org/fourthline/cling/protocol/sync/SendingUnsubscribe.java b/yaacc/src/main/java/org/fourthline/cling/protocol/sync/SendingUnsubscribe.java index cb2731f7..d5ae7480 100644 --- a/yaacc/src/main/java/org/fourthline/cling/protocol/sync/SendingUnsubscribe.java +++ b/yaacc/src/main/java/org/fourthline/cling/protocol/sync/SendingUnsubscribe.java @@ -53,7 +53,7 @@ public SendingUnsubscribe(UpnpService upnpService, RemoteGENASubscription subscr protected StreamResponseMessage executeSync() throws RouterException { - Log.d(getClass().getName(), "Sending unsubscribe request: " + getInputMessage()); + Log.v(getClass().getName(), "Sending unsubscribe request: " + getInputMessage()); StreamResponseMessage response = null; try { @@ -72,13 +72,13 @@ protected void onUnsubscribe(final StreamResponseMessage response) { new Runnable() { public void run() { if (response == null) { - Log.d(getClass().getName(), "Unsubscribe failed, no response received"); + Log.v(getClass().getName(), "Unsubscribe failed, no response received"); subscription.end(CancelReason.UNSUBSCRIBE_FAILED, null); } else if (response.getOperation().isFailed()) { - Log.d(getClass().getName(), "Unsubscribe failed, response was: " + response); + Log.v(getClass().getName(), "Unsubscribe failed, response was: " + response); subscription.end(CancelReason.UNSUBSCRIBE_FAILED, response.getOperation()); } else { - Log.d(getClass().getName(), "Unsubscribe successful, response was: " + response); + Log.v(getClass().getName(), "Unsubscribe successful, response was: " + response); subscription.end(null, response.getOperation()); } } diff --git a/yaacc/src/main/java/org/fourthline/cling/registry/LocalItems.java b/yaacc/src/main/java/org/fourthline/cling/registry/LocalItems.java index f3383cb3..2b711e1b 100644 --- a/yaacc/src/main/java/org/fourthline/cling/registry/LocalItems.java +++ b/yaacc/src/main/java/org/fourthline/cling/registry/LocalItems.java @@ -81,11 +81,11 @@ void add(final LocalDevice localDevice, DiscoveryOptions options) throws Registr setDiscoveryOptions(localDevice.getIdentity().getUdn(), options); if (registry.getDevice(localDevice.getIdentity().getUdn(), false) != null) { - Log.i(getClass().getName(), "Ignoring addition, device already registered: " + localDevice); + Log.v(getClass().getName(), "Ignoring addition, device already registered: " + localDevice); return; } - Log.i(getClass().getName(), "Adding local device to registry: " + localDevice); + Log.v(getClass().getName(), "Adding local device to registry: " + localDevice); for (Resource deviceResource : getResources(localDevice)) { @@ -94,11 +94,11 @@ void add(final LocalDevice localDevice, DiscoveryOptions options) throws Registr } registry.addResource(deviceResource); - Log.i(getClass().getName(), "Registered resource: " + deviceResource); + Log.v(getClass().getName(), "Registered resource: " + deviceResource); } - Log.i(getClass().getName(), "Adding item to registry with expiration in seconds: " + localDevice.getIdentity().getMaxAgeSeconds()); + Log.v(getClass().getName(), "Adding item to registry with expiration in seconds: " + localDevice.getIdentity().getMaxAgeSeconds()); RegistryItem localItem = new RegistryItem<>( localDevice.getIdentity().getUdn(), @@ -107,7 +107,7 @@ void add(final LocalDevice localDevice, DiscoveryOptions options) throws Registr ); getDeviceItems().add(localItem); - Log.i(getClass().getName(), "Registered local device: " + localItem); + Log.v(getClass().getName(), "Registered local device: " + localItem); if (isByeByeBeforeFirstAlive(localItem.getKey())) advertiseByebye(localDevice, true); @@ -144,14 +144,14 @@ boolean remove(final LocalDevice localDevice, boolean shuttingDown) throws Regis LocalDevice registeredDevice = get(localDevice.getIdentity().getUdn(), true); if (registeredDevice != null) { - Log.i(getClass().getName(), "Removing local device from registry: " + localDevice); + Log.v(getClass().getName(), "Removing local device from registry: " + localDevice); setDiscoveryOptions(localDevice.getIdentity().getUdn(), null); getDeviceItems().remove(new RegistryItem(localDevice.getIdentity().getUdn())); for (Resource deviceResource : getResources(localDevice)) { if (registry.removeResource(deviceResource)) { - Log.i(getClass().getName(), "Unregistered resource: " + deviceResource); + Log.v(getClass().getName(), "Unregistered resource: " + deviceResource); } } @@ -164,7 +164,7 @@ boolean remove(final LocalDevice localDevice, boolean shuttingDown) throws Regis incomingSubscription.getItem().getService().getDevice().getIdentity().getUdn(); if (subscriptionForUDN.equals(registeredDevice.getIdentity().getUdn())) { - Log.i(getClass().getName(), "Removing incoming subscription: " + incomingSubscription.getKey()); + Log.v(getClass().getName(), "Removing incoming subscription: " + incomingSubscription.getKey()); it.remove(); if (!shuttingDown) { registry.getConfiguration().getRegistryListenerExecutor().execute( @@ -235,7 +235,7 @@ void maintain() { lastAliveIntervalTimestamp = now; for (RegistryItem localItem : getDeviceItems()) { if (isAdvertised(localItem.getKey())) { - Log.i(getClass().getName(), "Flooding advertisement of local item: " + localItem); + Log.v(getClass().getName(), "Flooding advertisement of local item: " + localItem); expiredLocalItems.add(localItem); } } @@ -247,7 +247,7 @@ void maintain() { // Alive interval is not enabled, regular expiration check of all devices for (RegistryItem localItem : getDeviceItems()) { if (isAdvertised(localItem.getKey()) && localItem.getExpirationDetails().hasExpired(true)) { - Log.i(getClass().getName(), "Local item has expired: " + localItem); + Log.v(getClass().getName(), "Local item has expired: " + localItem); expiredLocalItems.add(localItem); } } @@ -255,7 +255,7 @@ void maintain() { // Now execute the advertisements for (RegistryItem expiredLocalItem : expiredLocalItems) { - Log.i(getClass().getName(), "Refreshing local device advertisement: " + expiredLocalItem.getItem()); + Log.v(getClass().getName(), "Refreshing local device advertisement: " + expiredLocalItem.getItem()); advertiseAlive(expiredLocalItem.getItem()); expiredLocalItem.getExpirationDetails().stampLastRefresh(); } @@ -268,7 +268,7 @@ void maintain() { } } for (RegistryItem subscription : expiredIncomingSubscriptions) { - Log.i(getClass().getName(), "Removing expired: " + subscription); + Log.v(getClass().getName(), "Removing expired: " + subscription); removeSubscription(subscription.getItem()); subscription.getItem().end(CancelReason.EXPIRED); } @@ -278,10 +278,10 @@ void maintain() { /* ############################################################################################################ */ void shutdown() { - Log.i(getClass().getName(), "Clearing all registered subscriptions to local devices during shutdown"); + Log.v(getClass().getName(), "Clearing all registered subscriptions to local devices during shutdown"); getSubscriptionItems().clear(); - Log.i(getClass().getName(), "Removing all local devices from registry during shutdown"); + Log.v(getClass().getName(), "Removing all local devices from registry during shutdown"); removeAll(true); } @@ -289,7 +289,7 @@ protected void advertiseAlive(final LocalDevice localDevice) { registry.executeAsyncProtocol(new Runnable() { public void run() { try { - Log.i(getClass().getName(), "Sleeping some milliseconds to avoid flooding the network with ALIVE msgs"); + Log.v(getClass().getName(), "Sleeping some milliseconds to avoid flooding the network with ALIVE msgs"); Thread.sleep(randomGenerator.nextInt(100)); } catch (InterruptedException ex) { Log.e(getClass().getName(), "Background execution interrupted: " + ex.getMessage()); diff --git a/yaacc/src/main/java/org/fourthline/cling/registry/RegistryImpl.java b/yaacc/src/main/java/org/fourthline/cling/registry/RegistryImpl.java index fd23730a..61476008 100644 --- a/yaacc/src/main/java/org/fourthline/cling/registry/RegistryImpl.java +++ b/yaacc/src/main/java/org/fourthline/cling/registry/RegistryImpl.java @@ -74,11 +74,11 @@ public RegistryImpl() { */ @Inject public RegistryImpl(UpnpService upnpService) { - Log.i(getClass().getName(), "Creating Registry: " + getClass().getName()); + Log.v(getClass().getName(), "Creating Registry: " + getClass().getName()); this.upnpService = upnpService; - Log.i(getClass().getName(), "Starting registry background maintenance..."); + Log.v(getClass().getName(), "Starting registry background maintenance..."); registryMaintainer = createRegistryMaintainer(); if (registryMaintainer != null) { getConfiguration().getRegistryMaintainerExecutor().execute(registryMaintainer); @@ -121,7 +121,7 @@ synchronized public Collection getListeners() { synchronized public boolean notifyDiscoveryStart(final RemoteDevice device) { // Exit if we have it already, this is atomic inside this method, finally if (getUpnpService().getRegistry().getRemoteDevice(device.getIdentity().getUdn(), true) != null) { - Log.i(getClass().getName(), "Not notifying listeners, already registered: " + device); + Log.v(getClass().getName(), "Not notifying listeners, already registered: " + device); return false; } for (final RegistryListener listener : getListeners()) { @@ -370,14 +370,14 @@ synchronized public void advertiseLocalDevices() { // When you call this, make sure you have the Router lock before this lock is obtained! synchronized public void shutdown() { - Log.i(getClass().getName(), "Shutting down registry..."); + Log.v(getClass().getName(), "Shutting down registry..."); if (registryMaintainer != null) registryMaintainer.stop(); // Final cleanup run to flush out pending executions which might // not have been caught by the maintainer before it stopped - Log.i(getClass().getName(), "Executing final pending operations on shutdown: " + pendingExecutions.size()); + Log.v(getClass().getName(), "Executing final pending operations on shutdown: " + pendingExecutions.size()); runPendingExecutions(false); for (RegistryListener listener : registryListeners) { @@ -399,7 +399,7 @@ synchronized public void shutdown() { synchronized public void pause() { if (registryMaintainer != null) { - Log.i(getClass().getName(), "Pausing registry maintenance"); + Log.v(getClass().getName(), "Pausing registry maintenance"); runPendingExecutions(true); registryMaintainer.stop(); registryMaintainer = null; @@ -408,7 +408,7 @@ synchronized public void pause() { synchronized public void resume() { if (registryMaintainer == null) { - Log.i(getClass().getName(), "Resuming registry maintenance"); + Log.v(getClass().getName(), "Resuming registry maintenance"); remoteItems.resume(); registryMaintainer = createRegistryMaintainer(); if (registryMaintainer != null) { @@ -426,7 +426,7 @@ synchronized public boolean isPaused() { synchronized void maintain() { - Log.i(getClass().getName(), "Maintaining registry..."); + Log.v(getClass().getName(), "Maintaining registry..."); // Remove expired resources Iterator> it = resourceItems.iterator(); @@ -434,7 +434,7 @@ synchronized void maintain() { RegistryItem item = it.next(); if (item.getExpirationDetails().hasExpired()) { - Log.i(getClass().getName(), "Removing expired resource: " + item); + Log.v(getClass().getName(), "Removing expired resource: " + item); it.remove(); } } @@ -461,7 +461,7 @@ synchronized void executeAsyncProtocol(Runnable runnable) { synchronized void runPendingExecutions(boolean async) { - Log.i(getClass().getName(), "Executing pending operations: " + pendingExecutions.size()); + Log.v(getClass().getName(), "Executing pending operations: " + pendingExecutions.size()); for (Runnable pendingExecution : pendingExecutions) { if (async) getConfiguration().getAsyncProtocolExecutor().execute(pendingExecution); @@ -477,25 +477,25 @@ synchronized void runPendingExecutions(boolean async) { public void printDebugLog() { { - Log.i(getClass().getName(), "==================================== REMOTE ================================================"); + Log.v(getClass().getName(), "==================================== REMOTE ================================================"); for (RemoteDevice remoteDevice : remoteItems.get()) { - Log.i(getClass().getName(), remoteDevice.toString()); + Log.v(getClass().getName(), remoteDevice.toString()); } - Log.i(getClass().getName(), "==================================== LOCAL ================================================"); + Log.v(getClass().getName(), "==================================== LOCAL ================================================"); for (LocalDevice localDevice : localItems.get()) { - Log.i(getClass().getName(), localDevice.toString()); + Log.v(getClass().getName(), localDevice.toString()); } - Log.i(getClass().getName(), "==================================== RESOURCES ================================================"); + Log.v(getClass().getName(), "==================================== RESOURCES ================================================"); for (RegistryItem resourceItem : resourceItems) { - Log.i(getClass().getName(), resourceItem.toString()); + Log.v(getClass().getName(), resourceItem.toString()); } - Log.i(getClass().getName(), "================================================================================================="); + Log.v(getClass().getName(), "================================================================================================="); } @@ -523,7 +523,7 @@ public RemoteGENASubscription getWaitRemoteSubscription(String subscriptionId) { RemoteGENASubscription subscription = getRemoteSubscription(subscriptionId); while (subscription == null && !pendingSubscriptionsLock.isEmpty()) { try { - Log.i(getClass().getName(), "Subscription not found, waiting for pending subscription procedure to terminate."); + Log.v(getClass().getName(), "Subscription not found, waiting for pending subscription procedure to terminate."); pendingSubscriptionsLock.wait(); } catch (InterruptedException e) { } diff --git a/yaacc/src/main/java/org/fourthline/cling/registry/RegistryMaintainer.java b/yaacc/src/main/java/org/fourthline/cling/registry/RegistryMaintainer.java index da77f1d9..7d59feb3 100644 --- a/yaacc/src/main/java/org/fourthline/cling/registry/RegistryMaintainer.java +++ b/yaacc/src/main/java/org/fourthline/cling/registry/RegistryMaintainer.java @@ -37,14 +37,14 @@ public RegistryMaintainer(RegistryImpl registry, int sleepIntervalMillis) { public void stop() { - Log.i(getClass().getName(), "Setting stopped status on thread"); + Log.v(getClass().getName(), "Setting stopped status on thread"); stopped = true; } public void run() { stopped = false; - Log.i(getClass().getName(), "Running registry maintenance loop every milliseconds: " + sleepIntervalMillis); + Log.v(getClass().getName(), "Running registry maintenance loop every milliseconds: " + sleepIntervalMillis); while (!stopped) { try { @@ -55,7 +55,7 @@ public void run() { } } - Log.i(getClass().getName(), "Stopped status on thread received, ending maintenance loop"); + Log.v(getClass().getName(), "Stopped status on thread received, ending maintenance loop"); } } \ No newline at end of file diff --git a/yaacc/src/main/java/org/fourthline/cling/registry/RemoteItems.java b/yaacc/src/main/java/org/fourthline/cling/registry/RemoteItems.java index 97b58c68..110ce994 100644 --- a/yaacc/src/main/java/org/fourthline/cling/registry/RemoteItems.java +++ b/yaacc/src/main/java/org/fourthline/cling/registry/RemoteItems.java @@ -60,14 +60,14 @@ class RemoteItems extends RegistryItems { void add(final RemoteDevice device) { if (update(device.getIdentity())) { - Log.i(getClass().getName(), "Ignoring addition, device already registered: " + device); + Log.v(getClass().getName(), "Ignoring addition, device already registered: " + device); return; } Resource[] resources = getResources(device); for (Resource deviceResource : resources) { - Log.i(getClass().getName(), "Validating remote device resource; " + deviceResource); + Log.v(getClass().getName(), "Validating remote device resource; " + deviceResource); if (registry.getResource(deviceResource.getPathQuery()) != null) { throw new RegistrationException("URI namespace conflict with already registered resource: " + deviceResource); } @@ -75,7 +75,7 @@ void add(final RemoteDevice device) { for (Resource validatedResource : resources) { registry.addResource(validatedResource); - Log.i(getClass().getName(), "Added remote device resource: " + validatedResource); + Log.v(getClass().getName(), "Added remote device resource: " + validatedResource); } // Override the device's maximum age if configured (systems without multicast support) @@ -86,7 +86,7 @@ void add(final RemoteDevice device) { ? registry.getConfiguration().getRemoteDeviceMaxAgeSeconds() : device.getIdentity().getMaxAgeSeconds() ); - Log.i(getClass().getName(), "Adding hydrated remote device to registry with " + Log.v(getClass().getName(), "Adding hydrated remote device to registry with " + item.getExpirationDetails().getMaxAgeSeconds() + " seconds expiration: " + device); getDeviceItems().add(item); @@ -98,11 +98,11 @@ void add(final RemoteDevice device) { sb.append(resource).append("\n"); } sb.append("-------------------------- END Registry Namespace -----------------------------------"); - Log.i(getClass().getName(), sb.toString()); + Log.v(getClass().getName(), sb.toString()); // Only notify the listeners when the device is fully usable - Log.i(getClass().getName(), "Completely hydrated remote device graph available, calling listeners: " + device); + Log.v(getClass().getName(), "Completely hydrated remote device graph available, calling listeners: " + device); for (final RegistryListener listener : registry.getListeners()) { registry.getConfiguration().getRegistryListenerExecutor().execute( new Runnable() { @@ -119,7 +119,7 @@ boolean update(RemoteDeviceIdentity rdIdentity) { for (LocalDevice localDevice : registry.getLocalDevices()) { if (localDevice.findDevice(rdIdentity.getUdn()) != null) { - Log.i(getClass().getName(), "Ignoring update, a local device graph contains UDN"); + Log.v(getClass().getName(), "Ignoring update, a local device graph contains UDN"); return true; } } @@ -128,7 +128,7 @@ boolean update(RemoteDeviceIdentity rdIdentity) { if (registeredRemoteDevice != null) { if (!registeredRemoteDevice.isRoot()) { - Log.i(getClass().getName(), "Updating root device of embedded: " + registeredRemoteDevice); + Log.v(getClass().getName(), "Updating root device of embedded: " + registeredRemoteDevice); registeredRemoteDevice = registeredRemoteDevice.getRoot(); } @@ -141,11 +141,11 @@ boolean update(RemoteDeviceIdentity rdIdentity) { : rdIdentity.getMaxAgeSeconds() ); - Log.i(getClass().getName(), "Updating expiration of: " + registeredRemoteDevice); + Log.v(getClass().getName(), "Updating expiration of: " + registeredRemoteDevice); getDeviceItems().remove(item); getDeviceItems().add(item); - Log.i(getClass().getName(), "Remote device updated, calling listeners: " + registeredRemoteDevice); + Log.v(getClass().getName(), "Remote device updated, calling listeners: " + registeredRemoteDevice); for (final RegistryListener listener : registry.getListeners()) { registry.getConfiguration().getRegistryListenerExecutor().execute( new Runnable() { @@ -176,12 +176,12 @@ boolean remove(final RemoteDevice remoteDevice, boolean shuttingDown) throws Reg final RemoteDevice registeredDevice = get(remoteDevice.getIdentity().getUdn(), true); if (registeredDevice != null) { - Log.i(getClass().getName(), "Removing remote device from registry: " + remoteDevice); + Log.v(getClass().getName(), "Removing remote device from registry: " + remoteDevice); // Resources for (Resource deviceResource : getResources(registeredDevice)) { if (registry.removeResource(deviceResource)) { - Log.i(getClass().getName(), "Unregistered resource: " + deviceResource); + Log.v(getClass().getName(), "Unregistered resource: " + deviceResource); } } @@ -194,7 +194,7 @@ boolean remove(final RemoteDevice remoteDevice, boolean shuttingDown) throws Reg outgoingSubscription.getItem().getService().getDevice().getIdentity().getUdn(); if (subscriptionForUDN.equals(registeredDevice.getIdentity().getUdn())) { - Log.i(getClass().getName(), "Removing outgoing subscription: " + outgoingSubscription.getKey()); + Log.v(getClass().getName(), "Removing outgoing subscription: " + outgoingSubscription.getKey()); it.remove(); if (!shuttingDown) { registry.getConfiguration().getRegistryListenerExecutor().execute( @@ -255,7 +255,7 @@ void maintain() { Map expiredRemoteDevices = new HashMap<>(); for (RegistryItem remoteItem : getDeviceItems()) { - Log.i(getClass().getName(), "Device '" + remoteItem.getItem() + "' expires in seconds: " + Log.v(getClass().getName(), "Device '" + remoteItem.getItem() + "' expires in seconds: " + remoteItem.getExpirationDetails().getSecondsUntilExpiration()); if (remoteItem.getExpirationDetails().hasExpired(false)) { expiredRemoteDevices.put(remoteItem.getKey(), remoteItem.getItem()); @@ -263,7 +263,7 @@ void maintain() { } for (RemoteDevice remoteDevice : expiredRemoteDevices.values()) { - Log.i(getClass().getName(), "Removing expired: " + remoteDevice); + Log.v(getClass().getName(), "Removing expired: " + remoteDevice); remove(remoteDevice); } @@ -276,13 +276,13 @@ void maintain() { } for (RemoteGENASubscription subscription : expiredOutgoingSubscriptions) { - Log.i(getClass().getName(), "Renewing outgoing subscription: " + subscription); + Log.v(getClass().getName(), "Renewing outgoing subscription: " + subscription); renewOutgoingSubscription(subscription); } } public void resume() { - Log.i(getClass().getName(), "Updating remote device expiration timestamps on resume"); + Log.v(getClass().getName(), "Updating remote device expiration timestamps on resume"); List toUpdate = new ArrayList<>(); for (RegistryItem remoteItem : getDeviceItems()) { toUpdate.add(remoteItem.getItem().getIdentity()); @@ -293,7 +293,7 @@ public void resume() { } void shutdown() { - Log.i(getClass().getName(), "Cancelling all outgoing subscriptions to remote devices during shutdown"); + Log.v(getClass().getName(), "Cancelling all outgoing subscriptions to remote devices during shutdown"); List remoteSubscriptions = new ArrayList<>(); for (RegistryItem item : getSubscriptionItems()) { remoteSubscriptions.add(item.getItem()); @@ -305,7 +305,7 @@ void shutdown() { .run(); } - Log.i(getClass().getName(), "Removing all remote devices from registry during shutdown"); + Log.v(getClass().getName(), "Removing all remote devices from registry during shutdown"); removeAll(true); } diff --git a/yaacc/src/main/java/org/fourthline/cling/support/avtransport/callback/Next.java b/yaacc/src/main/java/org/fourthline/cling/support/avtransport/callback/Next.java index 23abe4ee..7ccf0f74 100644 --- a/yaacc/src/main/java/org/fourthline/cling/support/avtransport/callback/Next.java +++ b/yaacc/src/main/java/org/fourthline/cling/support/avtransport/callback/Next.java @@ -48,6 +48,6 @@ public Next(UnsignedIntegerFourBytes instanceId, Service service) { @Override public void success(ActionInvocation invocation) { - Log.d(getClass().getName(), "Execution successful"); + Log.v(getClass().getName(), "Execution successful"); } } \ No newline at end of file diff --git a/yaacc/src/main/java/org/fourthline/cling/support/avtransport/callback/Pause.java b/yaacc/src/main/java/org/fourthline/cling/support/avtransport/callback/Pause.java index df9df0e8..c645f8ca 100644 --- a/yaacc/src/main/java/org/fourthline/cling/support/avtransport/callback/Pause.java +++ b/yaacc/src/main/java/org/fourthline/cling/support/avtransport/callback/Pause.java @@ -48,6 +48,6 @@ public Pause(UnsignedIntegerFourBytes instanceId, Service service) { @Override public void success(ActionInvocation invocation) { - Log.d(getClass().getName(), "Execution successful"); + Log.v(getClass().getName(), "Execution successful"); } } \ No newline at end of file diff --git a/yaacc/src/main/java/org/fourthline/cling/support/avtransport/callback/Play.java b/yaacc/src/main/java/org/fourthline/cling/support/avtransport/callback/Play.java index e09487d7..b3549508 100644 --- a/yaacc/src/main/java/org/fourthline/cling/support/avtransport/callback/Play.java +++ b/yaacc/src/main/java/org/fourthline/cling/support/avtransport/callback/Play.java @@ -48,6 +48,6 @@ public Play(UnsignedIntegerFourBytes instanceId, Service service, String speed) @Override public void success(ActionInvocation invocation) { - Log.d(getClass().getName(), "Execution successful"); + Log.v(getClass().getName(), "Execution successful"); } } \ No newline at end of file diff --git a/yaacc/src/main/java/org/fourthline/cling/support/avtransport/callback/Previous.java b/yaacc/src/main/java/org/fourthline/cling/support/avtransport/callback/Previous.java index 9889e304..74a4e5e9 100644 --- a/yaacc/src/main/java/org/fourthline/cling/support/avtransport/callback/Previous.java +++ b/yaacc/src/main/java/org/fourthline/cling/support/avtransport/callback/Previous.java @@ -48,6 +48,6 @@ public Previous(UnsignedIntegerFourBytes instanceId, Service service) { @Override public void success(ActionInvocation invocation) { - Log.d(getClass().getName(), "Execution successful"); + Log.v(getClass().getName(), "Execution successful"); } } \ No newline at end of file diff --git a/yaacc/src/main/java/org/fourthline/cling/support/avtransport/callback/Seek.java b/yaacc/src/main/java/org/fourthline/cling/support/avtransport/callback/Seek.java index daa878f2..17bac477 100644 --- a/yaacc/src/main/java/org/fourthline/cling/support/avtransport/callback/Seek.java +++ b/yaacc/src/main/java/org/fourthline/cling/support/avtransport/callback/Seek.java @@ -50,6 +50,6 @@ public Seek(UnsignedIntegerFourBytes instanceId, Service service, SeekMode mode, @Override public void success(ActionInvocation invocation) { - Log.d(getClass().getName(), "Execution successful"); + Log.v(getClass().getName(), "Execution successful"); } } \ No newline at end of file diff --git a/yaacc/src/main/java/org/fourthline/cling/support/avtransport/callback/SetAVTransportURI.java b/yaacc/src/main/java/org/fourthline/cling/support/avtransport/callback/SetAVTransportURI.java index e9335f9e..84a8f82e 100644 --- a/yaacc/src/main/java/org/fourthline/cling/support/avtransport/callback/SetAVTransportURI.java +++ b/yaacc/src/main/java/org/fourthline/cling/support/avtransport/callback/SetAVTransportURI.java @@ -42,7 +42,7 @@ public SetAVTransportURI(UnsignedIntegerFourBytes instanceId, Service service, S public SetAVTransportURI(UnsignedIntegerFourBytes instanceId, Service service, String uri, String metadata) { super(new ActionInvocation(service.getAction("SetAVTransportURI"))); - Log.d(getClass().getName(), "Creating SetAVTransportURI action for URI: " + uri); + Log.v(getClass().getName(), "Creating SetAVTransportURI action for URI: " + uri); getActionInvocation().setInput("InstanceID", instanceId); getActionInvocation().setInput("CurrentURI", uri); getActionInvocation().setInput("CurrentURIMetaData", metadata); @@ -50,6 +50,6 @@ public SetAVTransportURI(UnsignedIntegerFourBytes instanceId, Service service, S @Override public void success(ActionInvocation invocation) { - Log.d(getClass().getName(), "Execution successful"); + Log.v(getClass().getName(), "Execution successful"); } } \ No newline at end of file diff --git a/yaacc/src/main/java/org/fourthline/cling/support/avtransport/callback/SetPlayMode.java b/yaacc/src/main/java/org/fourthline/cling/support/avtransport/callback/SetPlayMode.java index b58cd935..1af9801c 100644 --- a/yaacc/src/main/java/org/fourthline/cling/support/avtransport/callback/SetPlayMode.java +++ b/yaacc/src/main/java/org/fourthline/cling/support/avtransport/callback/SetPlayMode.java @@ -41,6 +41,6 @@ public SetPlayMode(UnsignedIntegerFourBytes instanceId, Service service, PlayMod @Override public void success(ActionInvocation invocation) { - Log.d(getClass().getName(), "Execution successful"); + Log.v(getClass().getName(), "Execution successful"); } } \ No newline at end of file diff --git a/yaacc/src/main/java/org/fourthline/cling/support/avtransport/callback/Stop.java b/yaacc/src/main/java/org/fourthline/cling/support/avtransport/callback/Stop.java index f8cfdc33..599d0dde 100644 --- a/yaacc/src/main/java/org/fourthline/cling/support/avtransport/callback/Stop.java +++ b/yaacc/src/main/java/org/fourthline/cling/support/avtransport/callback/Stop.java @@ -39,6 +39,6 @@ public Stop(UnsignedIntegerFourBytes instanceId, Service service) { @Override public void success(ActionInvocation invocation) { - Log.d(getClass().getName(), "Execution successful"); + Log.v(getClass().getName(), "Execution successful"); } } \ No newline at end of file diff --git a/yaacc/src/main/java/org/fourthline/cling/support/avtransport/impl/AVTransportService.java b/yaacc/src/main/java/org/fourthline/cling/support/avtransport/impl/AVTransportService.java index 7d093acc..326fcabe 100644 --- a/yaacc/src/main/java/org/fourthline/cling/support/avtransport/impl/AVTransportService.java +++ b/yaacc/src/main/java/org/fourthline/cling/support/avtransport/impl/AVTransportService.java @@ -290,13 +290,13 @@ protected AVTransportStateMachine findStateMachine(UnsignedIntegerFourBytes inst long id = instanceId.getValue(); AVTransportStateMachine stateMachine = stateMachines.get(id); if (stateMachine == null && id == 0 && createDefaultTransport) { - Log.d(getClass().getName(), "Creating default transport instance with ID '0'"); + Log.v(getClass().getName(), "Creating default transport instance with ID '0'"); stateMachine = createStateMachine(instanceId); stateMachines.put(id, stateMachine); } else if (stateMachine == null) { throw new AVTransportException(AVTransportErrorCode.INVALID_INSTANCE_ID); } - Log.d(getClass().getName(), "Found transport control with ID '" + id + "'"); + Log.v(getClass().getName(), "Found transport control with ID '" + id + "'"); return stateMachine; } } diff --git a/yaacc/src/main/java/org/fourthline/cling/support/avtransport/impl/state/NoMediaPresent.java b/yaacc/src/main/java/org/fourthline/cling/support/avtransport/impl/state/NoMediaPresent.java index 47e8dc88..1c8ecdb7 100644 --- a/yaacc/src/main/java/org/fourthline/cling/support/avtransport/impl/state/NoMediaPresent.java +++ b/yaacc/src/main/java/org/fourthline/cling/support/avtransport/impl/state/NoMediaPresent.java @@ -36,7 +36,7 @@ public NoMediaPresent(T transport) { } public void onEntry() { - Log.d(getClass().getName(), "Setting transport state to NO_MEDIA_PRESENT"); + Log.v(getClass().getName(), "Setting transport state to NO_MEDIA_PRESENT"); getTransport().setTransportInfo( new TransportInfo( TransportState.NO_MEDIA_PRESENT, diff --git a/yaacc/src/main/java/org/fourthline/cling/support/avtransport/impl/state/PausedPlay.java b/yaacc/src/main/java/org/fourthline/cling/support/avtransport/impl/state/PausedPlay.java index eb632307..15257838 100644 --- a/yaacc/src/main/java/org/fourthline/cling/support/avtransport/impl/state/PausedPlay.java +++ b/yaacc/src/main/java/org/fourthline/cling/support/avtransport/impl/state/PausedPlay.java @@ -36,7 +36,7 @@ public PausedPlay(T transport) { } public void onEntry() { - Log.d(getClass().getName(), "Setting transport state to PAUSED_PLAYBACK"); + Log.v(getClass().getName(), "Setting transport state to PAUSED_PLAYBACK"); getTransport().setTransportInfo( new TransportInfo( TransportState.PAUSED_PLAYBACK, diff --git a/yaacc/src/main/java/org/fourthline/cling/support/avtransport/impl/state/Playing.java b/yaacc/src/main/java/org/fourthline/cling/support/avtransport/impl/state/Playing.java index 81b23a21..e35d8409 100644 --- a/yaacc/src/main/java/org/fourthline/cling/support/avtransport/impl/state/Playing.java +++ b/yaacc/src/main/java/org/fourthline/cling/support/avtransport/impl/state/Playing.java @@ -37,7 +37,7 @@ public Playing(T transport) { } public void onEntry() { - Log.d(getClass().getName(), "Setting transport state to PLAYING"); + Log.v(getClass().getName(), "Setting transport state to PLAYING"); getTransport().setTransportInfo( new TransportInfo( TransportState.PLAYING, diff --git a/yaacc/src/main/java/org/fourthline/cling/support/avtransport/impl/state/Stopped.java b/yaacc/src/main/java/org/fourthline/cling/support/avtransport/impl/state/Stopped.java index 4ddbe085..9c54b576 100644 --- a/yaacc/src/main/java/org/fourthline/cling/support/avtransport/impl/state/Stopped.java +++ b/yaacc/src/main/java/org/fourthline/cling/support/avtransport/impl/state/Stopped.java @@ -37,7 +37,7 @@ public Stopped(T transport) { } public void onEntry() { - Log.d(getClass().getName(), "Setting transport state to STOPPED"); + Log.v(getClass().getName(), "Setting transport state to STOPPED"); getTransport().setTransportInfo( new TransportInfo( TransportState.STOPPED, diff --git a/yaacc/src/main/java/org/fourthline/cling/support/connectionmanager/AbstractPeeringConnectionManagerService.java b/yaacc/src/main/java/org/fourthline/cling/support/connectionmanager/AbstractPeeringConnectionManagerService.java index b3a481d8..cc6573b4 100644 --- a/yaacc/src/main/java/org/fourthline/cling/support/connectionmanager/AbstractPeeringConnectionManagerService.java +++ b/yaacc/src/main/java/org/fourthline/cling/support/connectionmanager/AbstractPeeringConnectionManagerService.java @@ -72,7 +72,7 @@ synchronized protected int getNewConnectionId() { synchronized protected void storeConnection(ConnectionInfo info) { CSV oldConnectionIDs = getCurrentConnectionIDs(); activeConnections.put(info.getConnectionID(), info); - Log.d(getClass().getName(), "Connection stored, firing event: " + info.getConnectionID()); + Log.v(getClass().getName(), "Connection stored, firing event: " + info.getConnectionID()); CSV newConnectionIDs = getCurrentConnectionIDs(); getPropertyChangeSupport().firePropertyChange("CurrentConnectionIDs", oldConnectionIDs, newConnectionIDs); } @@ -80,7 +80,7 @@ synchronized protected void storeConnection(ConnectionInfo info) { synchronized protected void removeConnection(int connectionID) { CSV oldConnectionIDs = getCurrentConnectionIDs(); activeConnections.remove(connectionID); - Log.d(getClass().getName(), "Connection removed, firing event: " + connectionID); + Log.v(getClass().getName(), "Connection removed, firing event: " + connectionID); CSV newConnectionIDs = getCurrentConnectionIDs(); getPropertyChangeSupport().firePropertyChange("CurrentConnectionIDs", oldConnectionIDs, newConnectionIDs); } @@ -106,7 +106,7 @@ synchronized public ConnectionInfo prepareForConnection( throw new ConnectionManagerException(ErrorCode.ARGUMENT_VALUE_INVALID, "Unsupported direction: " + direction); } - Log.d(getClass().getName(), "Preparing for connection with local new ID " + connectionId + " and peer connection ID: " + peerConnectionId); + Log.v(getClass().getName(), "Preparing for connection with local new ID " + connectionId + " and peer connection ID: " + peerConnectionId); ConnectionInfo newConnectionInfo = createConnection( connectionId, @@ -125,7 +125,7 @@ synchronized public ConnectionInfo prepareForConnection( synchronized public void connectionComplete(@UpnpInputArgument(name = "ConnectionID", stateVariable = "A_ARG_TYPE_ConnectionID") int connectionID) throws ActionException { ConnectionInfo info = getCurrentConnectionInfo(connectionID); - Log.d(getClass().getName(), "Closing connection ID " + connectionID); + Log.v(getClass().getName(), "Closing connection ID " + connectionID); closeConnection(info); removeConnection(connectionID); } @@ -147,7 +147,7 @@ synchronized public int createConnectionWithPeer(final ServiceReference localSer final int localConnectionID = getNewConnectionId(); - Log.d(getClass().getName(), "Creating new connection ID " + localConnectionID + " with peer: " + peerService); + Log.v(getClass().getName(), "Creating new connection ID " + localConnectionID + " with peer: " + peerService); final boolean[] failed = new boolean[1]; new PrepareForConnection( peerService, @@ -201,7 +201,7 @@ synchronized public void closeConnectionWithPeer(final ControlPoint controlPoint final ConnectionInfo connectionInfo) throws ActionException { // It is important that you synchronize the whole procedure - Log.d(getClass().getName(), "Closing connection ID " + connectionInfo.getConnectionID() + " with peer: " + peerService); + Log.v(getClass().getName(), "Closing connection ID " + connectionInfo.getConnectionID() + " with peer: " + peerService); new ConnectionComplete( peerService, controlPoint, diff --git a/yaacc/src/main/java/org/fourthline/cling/support/connectionmanager/ConnectionManagerService.java b/yaacc/src/main/java/org/fourthline/cling/support/connectionmanager/ConnectionManagerService.java index d9dad5dd..af153a57 100644 --- a/yaacc/src/main/java/org/fourthline/cling/support/connectionmanager/ConnectionManagerService.java +++ b/yaacc/src/main/java/org/fourthline/cling/support/connectionmanager/ConnectionManagerService.java @@ -121,7 +121,7 @@ public PropertyChangeSupport getPropertyChangeSupport() { }) synchronized public ConnectionInfo getCurrentConnectionInfo(@UpnpInputArgument(name = "ConnectionID") int connectionId) throws ActionException { - Log.d(getClass().getName(), "Getting connection information of connection ID: " + connectionId); + Log.v(getClass().getName(), "Getting connection information of connection ID: " + connectionId); ConnectionInfo info; if ((info = activeConnections.get(connectionId)) == null) { throw new ConnectionManagerException( @@ -140,7 +140,7 @@ synchronized public CSV getCurrentConnectionIDs() { for (Integer connectionID : activeConnections.keySet()) { csv.add(new UnsignedIntegerFourBytes(connectionID)); } - Log.d(getClass().getName(), "Returning current connection IDs: " + csv.size()); + Log.v(getClass().getName(), "Returning current connection IDs: " + csv.size()); return csv; } diff --git a/yaacc/src/main/java/org/fourthline/cling/support/contentdirectory/DIDLParser.java b/yaacc/src/main/java/org/fourthline/cling/support/contentdirectory/DIDLParser.java index 5e6f91ca..f3977932 100644 --- a/yaacc/src/main/java/org/fourthline/cling/support/contentdirectory/DIDLParser.java +++ b/yaacc/src/main/java/org/fourthline/cling/support/contentdirectory/DIDLParser.java @@ -116,7 +116,7 @@ public DIDLContent parse(String xml) throws Exception { DIDLContent content = new DIDLContent(); createRootHandler(content, this); - Log.d(getClass().getName(), "Parsing DIDL XML content"); + Log.v(getClass().getName(), "Parsing DIDL XML content"); parse(new InputSource(new StringReader(xml.replaceAll("&(?!amp;)", "&")))); return content; } @@ -385,7 +385,7 @@ protected void generateContainer(Container container, Document descriptor, Eleme String title = container.getTitle(); if (title == null) { - Log.d(getClass().getName(), "Missing 'dc:title' element for container: " + container.getId()); + Log.v(getClass().getName(), "Missing 'dc:title' element for container: " + container.getId()); title = UNKNOWN_TITLE; } @@ -466,7 +466,7 @@ protected void generateItem(Item item, Document descriptor, Element parent) { String title = item.getTitle(); if (title == null) { - Log.d(getClass().getName(), "Missing 'dc:title' element for item: " + item.getId()); + Log.v(getClass().getName(), "Missing 'dc:title' element for item: " + item.getId()); title = UNKNOWN_TITLE; } @@ -587,7 +587,7 @@ protected void populateDescMetadata(Element descElement, DescMeta descMeta) { } } else { - Log.d(getClass().getName(), "Unknown desc metadata content, please override populateDescMetadata(): " + descMeta.getMetadata()); + Log.v(getClass().getName(), "Unknown desc metadata content, please override populateDescMetadata(): " + descMeta.getMetadata()); } } @@ -626,9 +626,9 @@ protected String booleanToInt(boolean b) { */ public void debugXML(String s) { - Log.d(getClass().getName(), "-------------------------------------------------------------------------------------"); - Log.d(getClass().getName(), "\n" + s); - Log.d(getClass().getName(), "-------------------------------------------------------------------------------------"); + Log.v(getClass().getName(), "-------------------------------------------------------------------------------------"); + Log.v(getClass().getName(), "\n" + s); + Log.v(getClass().getName(), "-------------------------------------------------------------------------------------"); } @@ -676,7 +676,7 @@ public void endElement(String uri, String localName, String qName) throws SAXExc WriteStatus.valueOf(getCharacters()) ); } catch (Exception ex) { - Log.i(getClass().getName(), "Ignoring invalid writeStatus value: " + getCharacters()); + Log.v(getClass().getName(), "Ignoring invalid writeStatus value: " + getCharacters()); } } else if ("class".equals(localName)) { getInstance().setClazz( diff --git a/yaacc/src/main/java/org/fourthline/cling/support/contentdirectory/callback/Browse.java b/yaacc/src/main/java/org/fourthline/cling/support/contentdirectory/callback/Browse.java index ab5a41b3..79a4a9fd 100644 --- a/yaacc/src/main/java/org/fourthline/cling/support/contentdirectory/callback/Browse.java +++ b/yaacc/src/main/java/org/fourthline/cling/support/contentdirectory/callback/Browse.java @@ -70,7 +70,7 @@ public Browse(Service service, String objectID, BrowseFlag flag, super(new ActionInvocation(service.getAction("Browse"))); - Log.d(getClass().getName(), "Creating browse action for object ID: " + objectID); + Log.v(getClass().getName(), "Creating browse action for object ID: " + objectID); getActionInvocation().setInput("ObjectID", objectID); getActionInvocation().setInput("BrowseFlag", flag.toString()); @@ -89,7 +89,7 @@ public void run() { } public void success(ActionInvocation invocation) { - Log.d(getClass().getName(), "Successful browse action, reading output argument values"); + Log.v(getClass().getName(), "Successful browse action, reading output argument values"); BrowseResult result = new BrowseResult( invocation.getOutput("Result").getValue().toString(), diff --git a/yaacc/src/main/java/org/fourthline/cling/support/contentdirectory/callback/Search.java b/yaacc/src/main/java/org/fourthline/cling/support/contentdirectory/callback/Search.java index cea6253c..611d4f52 100644 --- a/yaacc/src/main/java/org/fourthline/cling/support/contentdirectory/callback/Search.java +++ b/yaacc/src/main/java/org/fourthline/cling/support/contentdirectory/callback/Search.java @@ -68,7 +68,7 @@ public Search(Service service, String containerId, String searchCriteria, String long firstResult, Long maxResults, SortCriterion... orderBy) { super(new ActionInvocation(service.getAction("Search"))); - Log.d(getClass().getName(), "Creating browse action for container ID: " + containerId); + Log.v(getClass().getName(), "Creating browse action for container ID: " + containerId); getActionInvocation().setInput("ContainerID", containerId); getActionInvocation().setInput("SearchCriteria", searchCriteria); @@ -89,7 +89,7 @@ public void run() { @Override public void success(ActionInvocation actionInvocation) { - Log.d(getClass().getName(), "Successful search action, reading output argument values"); + Log.v(getClass().getName(), "Successful search action, reading output argument values"); SearchResult result = new SearchResult( actionInvocation.getOutput("Result").getValue().toString(), diff --git a/yaacc/src/main/java/org/fourthline/cling/support/igd/PortMappingListener.java b/yaacc/src/main/java/org/fourthline/cling/support/igd/PortMappingListener.java index 22e89e73..21d84dcb 100644 --- a/yaacc/src/main/java/org/fourthline/cling/support/igd/PortMappingListener.java +++ b/yaacc/src/main/java/org/fourthline/cling/support/igd/PortMappingListener.java @@ -96,7 +96,7 @@ synchronized public void deviceAdded(Registry registry, Device device) { Service connectionService; if ((connectionService = discoverConnectionService(device)) == null) return; - Log.d(getClass().getName(), "Activating port mappings on: " + connectionService); + Log.v(getClass().getName(), "Activating port mappings on: " + connectionService); final List activeForService = new ArrayList<>(); for (final PortMapping pm : portMappings) { @@ -104,7 +104,7 @@ synchronized public void deviceAdded(Registry registry, Device device) { @Override public void success(ActionInvocation invocation) { - Log.d(getClass().getName(), "Port mapping added: " + pm); + Log.v(getClass().getName(), "Port mapping added: " + pm); activeForService.add(pm); } @@ -142,12 +142,12 @@ synchronized public void beforeShutdown(Registry registry) { final Iterator it = activeEntry.getValue().iterator(); while (it.hasNext()) { final PortMapping pm = it.next(); - Log.d(getClass().getName(), "Trying to delete port mapping on IGD: " + pm); + Log.v(getClass().getName(), "Trying to delete port mapping on IGD: " + pm); new PortMappingDelete(activeEntry.getKey(), registry.getUpnpService().getControlPoint(), pm) { @Override public void success(ActionInvocation invocation) { - Log.d(getClass().getName(), "Port mapping deleted: " + pm); + Log.v(getClass().getName(), "Port mapping deleted: " + pm); it.remove(); } @@ -169,18 +169,18 @@ protected Service discoverConnectionService(Device device) { Device[] connectionDevices = device.findDevices(CONNECTION_DEVICE_TYPE); if (connectionDevices.length == 0) { - Log.d(getClass().getName(), "IGD doesn't support '" + CONNECTION_DEVICE_TYPE + "': " + device); + Log.v(getClass().getName(), "IGD doesn't support '" + CONNECTION_DEVICE_TYPE + "': " + device); return null; } Device connectionDevice = connectionDevices[0]; - Log.d(getClass().getName(), "Using first discovered WAN connection device: " + connectionDevice); + Log.v(getClass().getName(), "Using first discovered WAN connection device: " + connectionDevice); Service ipConnectionService = connectionDevice.findService(IP_SERVICE_TYPE); Service pppConnectionService = connectionDevice.findService(PPP_SERVICE_TYPE); if (ipConnectionService == null && pppConnectionService == null) { - Log.d(getClass().getName(), "IGD doesn't support IP or PPP WAN connection service: " + device); + Log.v(getClass().getName(), "IGD doesn't support IP or PPP WAN connection service: " + device); } return ipConnectionService != null ? ipConnectionService : pppConnectionService; diff --git a/yaacc/src/main/java/org/fourthline/cling/support/lastchange/EventedValueURI.java b/yaacc/src/main/java/org/fourthline/cling/support/lastchange/EventedValueURI.java index 8d5e1dc6..7ac9cfdf 100644 --- a/yaacc/src/main/java/org/fourthline/cling/support/lastchange/EventedValueURI.java +++ b/yaacc/src/main/java/org/fourthline/cling/support/lastchange/EventedValueURI.java @@ -45,7 +45,7 @@ protected URI valueOf(String s) throws InvalidValueException { // to parse whatever devices give us, like the Roku which sends "unknown url". return super.valueOf(s); } catch (InvalidValueException ex) { - Log.i(getClass().getName(), "Ignoring invalid URI in evented value '" + s + "': " + Exceptions.unwrap(ex)); + Log.v(getClass().getName(), "Ignoring invalid URI in evented value '" + s + "': " + Exceptions.unwrap(ex)); return null; } } diff --git a/yaacc/src/main/java/org/fourthline/cling/support/lastchange/LastChangeParser.java b/yaacc/src/main/java/org/fourthline/cling/support/lastchange/LastChangeParser.java index 3f1848f9..9d94a0e5 100644 --- a/yaacc/src/main/java/org/fourthline/cling/support/lastchange/LastChangeParser.java +++ b/yaacc/src/main/java/org/fourthline/cling/support/lastchange/LastChangeParser.java @@ -104,18 +104,18 @@ public Event parse(String xml) throws Exception { new RootHandler(event, this); - Log.d(getClass().getName(), "Parsing 'LastChange' event XML content"); - Log.d(getClass().getName(), "===================================== 'LastChange' BEGIN ============================================"); - Log.d(getClass().getName(), xml); - Log.d(getClass().getName(), "====================================== 'LastChange' END ============================================"); + Log.v(getClass().getName(), "Parsing 'LastChange' event XML content"); + Log.v(getClass().getName(), "===================================== 'LastChange' BEGIN ============================================"); + Log.v(getClass().getName(), xml); + Log.v(getClass().getName(), "====================================== 'LastChange' END ============================================"); parse(new InputSource(new StringReader(xml))); - Log.i(getClass().getName(), "Parsed event with instances IDs: " + event.getInstanceIDs().size()); + Log.v(getClass().getName(), "Parsed event with instances IDs: " + event.getInstanceIDs().size()); for (InstanceID instanceID : event.getInstanceIDs()) { - Log.i(getClass().getName(), "InstanceID '" + instanceID.getId() + "' has values: " + instanceID.getValues().size()); + Log.v(getClass().getName(), "InstanceID '" + instanceID.getId() + "' has values: " + instanceID.getValues().size()); for (EventedValue eventedValue : instanceID.getValues()) { - Log.i(getClass().getName(), eventedValue.getName() + " => " + eventedValue.getValue()); + Log.v(getClass().getName(), eventedValue.getName() + " => " + eventedValue.getValue()); } } diff --git a/yaacc/src/main/java/org/fourthline/cling/support/model/dlna/DLNAAttribute.java b/yaacc/src/main/java/org/fourthline/cling/support/model/dlna/DLNAAttribute.java index f7c32412..33c63ca6 100644 --- a/yaacc/src/main/java/org/fourthline/cling/support/model/dlna/DLNAAttribute.java +++ b/yaacc/src/main/java/org/fourthline/cling/support/model/dlna/DLNAAttribute.java @@ -56,13 +56,13 @@ public static DLNAAttribute newInstance(DLNAAttribute.Type type, String attribut for (int i = 0; i < type.getAttributeTypes().length && attr == null; i++) { Class attributeClass = type.getAttributeTypes()[i]; try { - Log.i(DLNAAttribute.class.getName(), "Trying to parse DLNA '" + type + "' with class: " + attributeClass.getSimpleName()); + Log.v(DLNAAttribute.class.getName(), "Trying to parse DLNA '" + type + "' with class: " + attributeClass.getSimpleName()); attr = attributeClass.newInstance(); if (attributeValue != null) { attr.setString(attributeValue, contentFormat); } } catch (InvalidDLNAProtocolAttributeException ex) { - Log.i(DLNAAttribute.class.getName(), "Invalid DLNA attribute value for tested type: " + attributeClass.getSimpleName() + " - " + ex.getMessage()); + Log.v(DLNAAttribute.class.getName(), "Invalid DLNA attribute value for tested type: " + attributeClass.getSimpleName() + " - " + ex.getMessage()); attr = null; } catch (Exception ex) { Log.e(DLNAAttribute.class.getName(), "Error instantiating DLNA attribute of type '" + type + "' with value: " + attributeValue); diff --git a/yaacc/src/main/java/org/fourthline/cling/support/model/dlna/message/DLNAHeaders.java b/yaacc/src/main/java/org/fourthline/cling/support/model/dlna/message/DLNAHeaders.java index b192b387..e11bf3d1 100644 --- a/yaacc/src/main/java/org/fourthline/cling/support/model/dlna/message/DLNAHeaders.java +++ b/yaacc/src/main/java/org/fourthline/cling/support/model/dlna/message/DLNAHeaders.java @@ -55,21 +55,21 @@ protected void parseHeaders() { // This runs as late as possible and only when necessary (getter called and map is dirty) parsedDLNAHeaders = new LinkedHashMap<>(); - Log.d(getClass().getName(), String.format("Parsing all HTTP headers for known UPnP headers: {0}", size())); + Log.v(getClass().getName(), String.format("Parsing all HTTP headers for known UPnP headers: {0}", size())); for (Entry> entry : entrySet()) { if (entry.getKey() == null) continue; // Oh yes, the JDK has 'null' HTTP headers DLNAHeader.Type type = DLNAHeader.Type.getByHttpName(entry.getKey()); if (type == null) { - Log.d(getClass().getName(), String.format("Ignoring non-UPNP HTTP header: {0}", entry.getKey())); + Log.v(getClass().getName(), String.format("Ignoring non-UPNP HTTP header: {0}", entry.getKey())); continue; } for (String value : entry.getValue()) { UpnpHeader upnpHeader = DLNAHeader.newInstance(type, value); if (upnpHeader == null || upnpHeader.getValue() == null) { - Log.d(getClass().getName(), String.format("Ignoring known but non-parsable header (value violates the UDA specification?) '{0}': {1}", new Object[]{type.getHttpName(), value})); + Log.v(getClass().getName(), String.format("Ignoring known but non-parsable header (value violates the UDA specification?) '{0}': {1}", new Object[]{type.getHttpName(), value})); } else { addParsedValue(type, upnpHeader); } @@ -78,7 +78,7 @@ protected void parseHeaders() { } protected void addParsedValue(DLNAHeader.Type type, UpnpHeader value) { - Log.d(getClass().getName(), String.format("Adding parsed header: {0}", value)); + Log.v(getClass().getName(), String.format("Adding parsed header: {0}", value)); List list = parsedDLNAHeaders.get(type); if (list == null) { list = new LinkedList<>(); @@ -163,15 +163,15 @@ public void log() { super.log(); if (parsedDLNAHeaders != null && parsedDLNAHeaders.size() > 0) { - Log.d(getClass().getName(), "########################## PARSED DLNA HEADERS ##########################"); + Log.v(getClass().getName(), "########################## PARSED DLNA HEADERS ##########################"); for (Map.Entry> entry : parsedDLNAHeaders.entrySet()) { - Log.d(getClass().getName(), String.format("=== TYPE: {0}", entry.getKey())); + Log.v(getClass().getName(), String.format("=== TYPE: {0}", entry.getKey())); for (UpnpHeader upnpHeader : entry.getValue()) { - Log.d(getClass().getName(), String.format("HEADER: {0}", upnpHeader)); + Log.v(getClass().getName(), String.format("HEADER: {0}", upnpHeader)); } } } - Log.d(getClass().getName(), "####################################################################"); + Log.v(getClass().getName(), "####################################################################"); } diff --git a/yaacc/src/main/java/org/fourthline/cling/support/model/dlna/message/header/DLNAHeader.java b/yaacc/src/main/java/org/fourthline/cling/support/model/dlna/message/header/DLNAHeader.java index 6c104806..29eaa962 100644 --- a/yaacc/src/main/java/org/fourthline/cling/support/model/dlna/message/header/DLNAHeader.java +++ b/yaacc/src/main/java/org/fourthline/cling/support/model/dlna/message/header/DLNAHeader.java @@ -57,13 +57,13 @@ public static DLNAHeader newInstance(DLNAHeader.Type type, String headerValue) { for (int i = 0; i < type.getHeaderTypes().length && upnpHeader == null; i++) { Class headerClass = type.getHeaderTypes()[i]; try { - Log.i(DLNAHeader.class.getName(), "Trying to parse '" + type + "' with class: " + headerClass.getSimpleName()); + Log.v(DLNAHeader.class.getName(), "Trying to parse '" + type + "' with class: " + headerClass.getSimpleName()); upnpHeader = headerClass.newInstance(); if (headerValue != null) { upnpHeader.setString(headerValue); } } catch (InvalidHeaderException ex) { - Log.i(DLNAHeader.class.getName(), "Invalid header value for tested type: " + headerClass.getSimpleName() + " - " + ex.getMessage()); + Log.v(DLNAHeader.class.getName(), "Invalid header value for tested type: " + headerClass.getSimpleName() + " - " + ex.getMessage()); upnpHeader = null; } catch (Exception ex) { Log.e(DLNAHeader.class.getName(), "Error instantiating header of type '" + type + "' with value: " + headerValue); diff --git a/yaacc/src/main/java/org/fourthline/cling/support/renderingcontrol/callback/SetMute.java b/yaacc/src/main/java/org/fourthline/cling/support/renderingcontrol/callback/SetMute.java index 431480db..4f13bbc5 100644 --- a/yaacc/src/main/java/org/fourthline/cling/support/renderingcontrol/callback/SetMute.java +++ b/yaacc/src/main/java/org/fourthline/cling/support/renderingcontrol/callback/SetMute.java @@ -42,7 +42,7 @@ public SetMute(UnsignedIntegerFourBytes instanceId, Service service, boolean des @Override public void success(ActionInvocation invocation) { - Log.d(getClass().getName(), "Executed successfully"); + Log.v(getClass().getName(), "Executed successfully"); } } \ No newline at end of file diff --git a/yaacc/src/main/java/org/fourthline/cling/support/renderingcontrol/callback/SetVolume.java b/yaacc/src/main/java/org/fourthline/cling/support/renderingcontrol/callback/SetVolume.java index 7ac40b76..762cbf28 100644 --- a/yaacc/src/main/java/org/fourthline/cling/support/renderingcontrol/callback/SetVolume.java +++ b/yaacc/src/main/java/org/fourthline/cling/support/renderingcontrol/callback/SetVolume.java @@ -43,7 +43,7 @@ public SetVolume(UnsignedIntegerFourBytes instanceId, Service service, long newV @Override public void success(ActionInvocation invocation) { - Log.d(getClass().getName(), "Executed successfully"); + Log.v(getClass().getName(), "Executed successfully"); } } \ No newline at end of file diff --git a/yaacc/src/main/java/org/fourthline/cling/transport/RouterImpl.java b/yaacc/src/main/java/org/fourthline/cling/transport/RouterImpl.java index 3fe60a03..90c6dc00 100644 --- a/yaacc/src/main/java/org/fourthline/cling/transport/RouterImpl.java +++ b/yaacc/src/main/java/org/fourthline/cling/transport/RouterImpl.java @@ -90,7 +90,7 @@ protected RouterImpl() { */ @Inject public RouterImpl(UpnpServiceConfiguration configuration, ProtocolFactory protocolFactory) { - Log.i(getClass().getName(), "Creating Router: " + getClass().getName()); + Log.v(getClass().getName(), "Creating Router: " + getClass().getName()); this.configuration = configuration; this.protocolFactory = protocolFactory; } @@ -124,7 +124,7 @@ public boolean enable() throws RouterException { try { if (!enabled) { try { - Log.d(getClass().getName(), "Starting networking services..."); + Log.v(getClass().getName(), "Starting networking services..."); networkAddressFactory = getConfiguration().createNetworkAddressFactory(); startInterfaceBasedTransports(networkAddressFactory.getNetworkInterfaces()); @@ -157,28 +157,28 @@ public boolean disable() throws RouterException { lock(writeLock); try { if (enabled) { - Log.d(getClass().getName(), "Disabling network services..."); + Log.v(getClass().getName(), "Disabling network services..."); if (streamClient != null) { - Log.d(getClass().getName(), "Stopping stream client connection management/pool"); + Log.v(getClass().getName(), "Stopping stream client connection management/pool"); streamClient.stop(); streamClient = null; } for (Map.Entry entry : streamServers.entrySet()) { - Log.d(getClass().getName(), "Stopping stream server on address: " + entry.getKey()); + Log.v(getClass().getName(), "Stopping stream server on address: " + entry.getKey()); entry.getValue().stop(); } streamServers.clear(); for (Map.Entry entry : multicastReceivers.entrySet()) { - Log.d(getClass().getName(), "Stopping multicast receiver on interface: " + entry.getKey().getDisplayName()); + Log.v(getClass().getName(), "Stopping multicast receiver on interface: " + entry.getKey().getDisplayName()); entry.getValue().stop(); } multicastReceivers.clear(); for (Map.Entry entry : datagramIOs.entrySet()) { - Log.d(getClass().getName(), "Stopping datagram I/O on address: " + entry.getKey()); + Log.v(getClass().getName(), "Stopping datagram I/O on address: " + entry.getKey()); entry.getValue().stop(); } datagramIOs.clear(); @@ -206,7 +206,7 @@ public boolean isEnabled() { @Override public void handleStartFailure(InitializationException ex) throws InitializationException { if (ex instanceof NoNetworkException) { - Log.d(getClass().getName(), "Unable to initialize network router, no network found."); + Log.v(getClass().getName(), "Unable to initialize network router, no network found."); } else { Log.e(getClass().getName(), "Unable to initialize network router: " + ex); Log.e(getClass().getName(), "Cause: " + Exceptions.unwrap(ex)); @@ -262,18 +262,18 @@ public List getActiveStreamServers(InetAddress preferredAddress) */ public void received(IncomingDatagramMessage msg) { if (!enabled) { - Log.d(getClass().getName(), "Router disabled, ignoring incoming message: " + msg); + Log.v(getClass().getName(), "Router disabled, ignoring incoming message: " + msg); return; } try { ReceivingAsync protocol = getProtocolFactory().createReceivingAsync(msg); if (protocol == null) { - Log.d(getClass().getName(), "No protocol, ignoring received message: " + msg); + Log.v(getClass().getName(), "No protocol, ignoring received message: " + msg); return; } - Log.i(getClass().getName(), "Received asynchronous message: " + msg); + Log.v(getClass().getName(), "Received asynchronous message: " + msg); getConfiguration().getAsyncProtocolExecutor().execute(protocol); } catch (ProtocolCreationException ex) { Log.w(getClass().getName(), "Handling received datagram failed - " + Exceptions.unwrap(ex).toString()); @@ -288,10 +288,10 @@ public void received(IncomingDatagramMessage msg) { */ public void received(UpnpStream stream) { if (!enabled) { - Log.d(getClass().getName(), "Router disabled, ignoring incoming: " + stream); + Log.v(getClass().getName(), "Router disabled, ignoring incoming: " + stream); return; } - Log.d(getClass().getName(), "Received synchronous stream: " + stream); + Log.v(getClass().getName(), "Received synchronous stream: " + stream); getConfiguration().getSyncProtocolExecutorService().execute(stream); } @@ -308,7 +308,7 @@ public void send(OutgoingDatagramMessage msg) throws RouterException { datagramIO.send(msg); } } else { - Log.d(getClass().getName(), "Router disabled, not sending datagram: " + msg); + Log.v(getClass().getName(), "Router disabled, not sending datagram: " + msg); } } finally { unlock(readLock); @@ -327,17 +327,17 @@ public StreamResponseMessage send(StreamRequestMessage msg) throws RouterExcepti try { if (enabled) { if (streamClient == null) { - Log.d(getClass().getName(), "No StreamClient available, not sending: " + msg); + Log.v(getClass().getName(), "No StreamClient available, not sending: " + msg); return null; } - Log.d(getClass().getName(), "Sending via TCP unicast stream: " + msg); + Log.v(getClass().getName(), "Sending via TCP unicast stream: " + msg); try { return streamClient.sendRequest(msg); } catch (InterruptedException ex) { throw new RouterException("Sending stream request was interrupted", ex); } } else { - Log.d(getClass().getName(), "Router disabled, not sending stream request: " + msg); + Log.v(getClass().getName(), "Router disabled, not sending stream request: " + msg); return null; } } finally { @@ -361,13 +361,13 @@ public void broadcast(byte[] bytes) throws RouterException { for (Map.Entry entry : datagramIOs.entrySet()) { InetAddress broadcast = networkAddressFactory.getBroadcastAddress(entry.getKey()); if (broadcast != null) { - Log.d(getClass().getName(), "Sending UDP datagram to broadcast address: " + broadcast.getHostAddress()); + Log.v(getClass().getName(), "Sending UDP datagram to broadcast address: " + broadcast.getHostAddress()); DatagramPacket packet = new DatagramPacket(bytes, bytes.length, broadcast, 9); entry.getValue().send(packet); } } } else { - Log.d(getClass().getName(), "Router disabled, not broadcasting bytes: " + bytes.length); + Log.v(getClass().getName(), "Router disabled, not broadcasting bytes: " + bytes.length); } } finally { unlock(readLock); @@ -380,10 +380,10 @@ protected void startInterfaceBasedTransports(Iterator interfac // We only have the MulticastReceiver as an interface-based transport MulticastReceiver multicastReceiver = getConfiguration().createMulticastReceiver(networkAddressFactory); if (multicastReceiver == null) { - Log.i(getClass().getName(), "Configuration did not create a MulticastReceiver for: " + networkInterface); + Log.v(getClass().getName(), "Configuration did not create a MulticastReceiver for: " + networkInterface); } else { try { - Log.d(getClass().getName(), "Init multicast receiver on interface: " + networkInterface.getDisplayName()); + Log.v(getClass().getName(), "Init multicast receiver on interface: " + networkInterface.getDisplayName()); multicastReceiver.init( networkInterface, this, @@ -410,7 +410,7 @@ protected void startInterfaceBasedTransports(Iterator interfac } for (Map.Entry entry : multicastReceivers.entrySet()) { - Log.d(getClass().getName(), "Starting multicast receiver on interface: " + entry.getKey().getDisplayName()); + Log.v(getClass().getName(), "Starting multicast receiver on interface: " + entry.getKey().getDisplayName()); getConfiguration().getMulticastReceiverExecutor().execute(entry.getValue()); } } @@ -425,11 +425,11 @@ protected void startAddressBasedTransports(Iterator addresses) thro // HTTP servers StreamServer streamServer = getConfiguration().createStreamServer(protocolFactory, networkAddressFactory); if (streamServer == null) { - Log.i(getClass().getName(), "Configuration did not create a StreamServer for: " + address); + Log.v(getClass().getName(), "Configuration did not create a StreamServer for: " + address); } else { try { - Log.i(getClass().getName(), "Init stream server on address: " + address); + Log.v(getClass().getName(), "Init stream server on address: " + address); streamServer.init(address, this); streamServers.put(address, streamServer); } catch (InitializationException ex) { @@ -437,7 +437,7 @@ protected void startAddressBasedTransports(Iterator addresses) thro Throwable cause = Exceptions.unwrap(ex); if (cause instanceof BindException) { Log.w(getClass().getName(), "Failed to init StreamServer: " + cause); - Log.i(getClass().getName(), "Initialization exception root cause", cause); + Log.v(getClass().getName(), "Initialization exception root cause", cause); Log.w(getClass().getName(), "Removing unusable address: " + address); addresses.remove(); continue; // Don't try anything else with this address @@ -449,10 +449,10 @@ protected void startAddressBasedTransports(Iterator addresses) thro // Datagram I/O DatagramIO datagramIO = getConfiguration().createDatagramIO(networkAddressFactory); if (datagramIO == null) { - Log.i(getClass().getName(), "Configuration did not create a StreamServer for: " + address); + Log.v(getClass().getName(), "Configuration did not create a StreamServer for: " + address); } else { try { - Log.i(getClass().getName(), "Init datagram I/O on address: " + address); + Log.v(getClass().getName(), "Init datagram I/O on address: " + address); datagramIO.init(address, this, getConfiguration().getDatagramProcessor()); datagramIOs.put(address, datagramIO); } catch (InitializationException ex) { @@ -473,12 +473,12 @@ protected void startAddressBasedTransports(Iterator addresses) thro } for (Map.Entry entry : streamServers.entrySet()) { - Log.i(getClass().getName(), "Starting stream server on address: " + entry.getKey()); + Log.v(getClass().getName(), "Starting stream server on address: " + entry.getKey()); getConfiguration().getStreamServerExecutorService().execute(entry.getValue()); } for (Map.Entry entry : datagramIOs.entrySet()) { - Log.i(getClass().getName(), "Starting datagram I/O on address: " + entry.getKey()); + Log.v(getClass().getName(), "Starting datagram I/O on address: " + entry.getKey()); getConfiguration().getDatagramIOExecutor().execute(entry.getValue()); } } diff --git a/yaacc/src/main/java/org/fourthline/cling/transport/impl/DatagramIOImpl.java b/yaacc/src/main/java/org/fourthline/cling/transport/impl/DatagramIOImpl.java index 6593e186..3a34587d 100644 --- a/yaacc/src/main/java/org/fourthline/cling/transport/impl/DatagramIOImpl.java +++ b/yaacc/src/main/java/org/fourthline/cling/transport/impl/DatagramIOImpl.java @@ -81,7 +81,7 @@ synchronized public void init(InetAddress bindAddress, Router router, DatagramPr // TODO: UPNP VIOLATION: The spec does not prohibit using the 1900 port here again, however, the // Netgear ReadyNAS miniDLNA implementation will no longer answer if it has to send search response // back via UDP unicast to port 1900... so we use an ephemeral port - Log.i(getClass().getName(), "Creating bound socket (for datagram input/output) on: " + bindAddress); + Log.v(getClass().getName(), "Creating bound socket (for datagram input/output) on: " + bindAddress); localAddress = new InetSocketAddress(bindAddress, 0); socket = new MulticastSocket(localAddress); socket.setTimeToLive(configuration.getTimeToLive()); @@ -98,7 +98,7 @@ synchronized public void stop() { } public void run() { - Log.d(getClass().getName(), "Entering blocking receiving loop, listening for UDP datagrams on: " + socket.getLocalAddress()); + Log.v(getClass().getName(), "Entering blocking receiving loop, listening for UDP datagrams on: " + socket.getLocalAddress()); while (true) { @@ -108,7 +108,7 @@ public void run() { socket.receive(datagram); - Log.d(getClass().getName(), + Log.v(getClass().getName(), "UDP datagram received from: " + datagram.getAddress().getHostAddress() + ":" + datagram.getPort() @@ -119,17 +119,17 @@ public void run() { router.received(datagramProcessor.read(localAddress.getAddress(), datagram)); } catch (SocketException ex) { - Log.d(getClass().getName(), "Socket closed", ex); + Log.v(getClass().getName(), "Socket closed", ex); break; } catch (UnsupportedDataException ex) { - Log.d(getClass().getName(), "Could not read datagram: " + ex.getMessage(), ex); + Log.v(getClass().getName(), "Could not read datagram: " + ex.getMessage(), ex); } catch (Exception ex) { throw new RuntimeException(ex); } } try { if (!socket.isClosed()) { - Log.d(getClass().getName(), "Closing unicast socket"); + Log.v(getClass().getName(), "Closing unicast socket"); socket.close(); } } catch (Exception ex) { @@ -138,24 +138,24 @@ public void run() { } synchronized public void send(OutgoingDatagramMessage message) { - Log.d(getClass().getName(), "Sending message from address: " + localAddress); + Log.v(getClass().getName(), "Sending message from address: " + localAddress); DatagramPacket packet = datagramProcessor.write(message); - Log.d(getClass().getName(), "Sending UDP datagram packet to: " + message.getDestinationAddress() + ":" + message.getDestinationPort()); + Log.v(getClass().getName(), "Sending UDP datagram packet to: " + message.getDestinationAddress() + ":" + message.getDestinationPort()); send(packet); } synchronized public void send(DatagramPacket datagram) { - Log.d(getClass().getName(), "Sending message from address: " + localAddress); + Log.v(getClass().getName(), "Sending message from address: " + localAddress); try { socket.send(datagram); } catch (SocketException ex) { - Log.d(getClass().getName(), "Socket closed, aborting datagram send to: " + datagram.getAddress()); + Log.v(getClass().getName(), "Socket closed, aborting datagram send to: " + datagram.getAddress()); } catch (RuntimeException ex) { throw ex; } catch (Exception ex) { diff --git a/yaacc/src/main/java/org/fourthline/cling/transport/impl/DatagramProcessorImpl.java b/yaacc/src/main/java/org/fourthline/cling/transport/impl/DatagramProcessorImpl.java index ee5bb336..e8c7b02b 100644 --- a/yaacc/src/main/java/org/fourthline/cling/transport/impl/DatagramProcessorImpl.java +++ b/yaacc/src/main/java/org/fourthline/cling/transport/impl/DatagramProcessorImpl.java @@ -103,7 +103,7 @@ public DatagramPacket write(OutgoingDatagramMessage message) throws UnsupportedD // TODO: Probably should look into escaping rules, too byte[] data = messageData.toString().getBytes("US-ASCII"); - Log.d(getClass().getName(), "Writing new datagram packet with " + data.length + " bytes for: " + message); + Log.v(getClass().getName(), "Writing new datagram packet with " + data.length + " bytes for: " + message); return new DatagramPacket(data, data.length, message.getDestinationAddress(), message.getDestinationPort()); } catch (UnsupportedEncodingException ex) { diff --git a/yaacc/src/main/java/org/fourthline/cling/transport/impl/GENAEventProcessorImpl.java b/yaacc/src/main/java/org/fourthline/cling/transport/impl/GENAEventProcessorImpl.java index 81fef44f..82daba20 100644 --- a/yaacc/src/main/java/org/fourthline/cling/transport/impl/GENAEventProcessorImpl.java +++ b/yaacc/src/main/java/org/fourthline/cling/transport/impl/GENAEventProcessorImpl.java @@ -54,7 +54,7 @@ protected DocumentBuilderFactory createDocumentBuilderFactory() throws FactoryCo } public void writeBody(OutgoingEventRequestMessage requestMessage) throws UnsupportedDataException { - Log.d(getClass().getName(), "Writing body of: " + requestMessage); + Log.v(getClass().getName(), "Writing body of: " + requestMessage); try { @@ -77,7 +77,7 @@ public void writeBody(OutgoingEventRequestMessage requestMessage) throws Unsuppo public void readBody(IncomingEventRequestMessage requestMessage) throws UnsupportedDataException { - Log.d(getClass().getName(), "Reading body of: " + requestMessage); + Log.v(getClass().getName(), "Reading body of: " + requestMessage); Log.v(getClass().getName(), "===================================== GENA BODY BEGIN ============================================"); Log.v(getClass().getName(), requestMessage.getBody() != null ? requestMessage.getBody().toString() : "null"); Log.v(getClass().getName(), "-===================================== GENA BODY END ============================================"); @@ -160,7 +160,7 @@ protected void readProperties(Element propertysetElement, IncomingEventRequestMe String stateVariableName = getUnprefixedNodeName(propertyChild); for (StateVariable stateVariable : stateVariables) { if (stateVariable.getName().equals(stateVariableName)) { - Log.d(getClass().getName(), "Reading state variable value: " + stateVariableName); + Log.v(getClass().getName(), "Reading state variable value: " + stateVariableName); String value = XMLUtil.getTextContent(propertyChild); message.getStateVariableValues().add( new StateVariableValue(stateVariable, value) diff --git a/yaacc/src/main/java/org/fourthline/cling/transport/impl/MulticastReceiverImpl.java b/yaacc/src/main/java/org/fourthline/cling/transport/impl/MulticastReceiverImpl.java index d3e58183..a1fb8729 100644 --- a/yaacc/src/main/java/org/fourthline/cling/transport/impl/MulticastReceiverImpl.java +++ b/yaacc/src/main/java/org/fourthline/cling/transport/impl/MulticastReceiverImpl.java @@ -73,14 +73,14 @@ synchronized public void init(NetworkInterface networkInterface, try { - Log.i(getClass().getName(), "Creating wildcard socket (for receiving multicast datagrams) on port: " + configuration.getPort()); + Log.v(getClass().getName(), "Creating wildcard socket (for receiving multicast datagrams) on port: " + configuration.getPort()); multicastAddress = new InetSocketAddress(configuration.getGroup(), configuration.getPort()); socket = new MulticastSocket(configuration.getPort()); socket.setReuseAddress(true); socket.setReceiveBufferSize(32768); // Keep a backlog of incoming datagrams if we are not fast enough - Log.i(getClass().getName(), "Joining multicast group: " + multicastAddress + " on network interface: " + multicastInterface.getDisplayName()); + Log.v(getClass().getName(), "Joining multicast group: " + multicastAddress + " on network interface: " + multicastInterface.getDisplayName()); socket.joinGroup(multicastAddress, multicastInterface); } catch (Exception ex) { @@ -91,11 +91,11 @@ synchronized public void init(NetworkInterface networkInterface, synchronized public void stop() { if (socket != null && !socket.isClosed()) { try { - Log.d(getClass().getName(), "Leaving multicast group"); + Log.v(getClass().getName(), "Leaving multicast group"); socket.leaveGroup(multicastAddress, multicastInterface); // Well this doesn't work and I have no idea why I get "java.net.SocketException: Can't assign requested address" } catch (Exception ex) { - Log.d(getClass().getName(), "Could not leave multicast group: ", ex); + Log.v(getClass().getName(), "Could not leave multicast group: ", ex); } // So... just close it and ignore the log messages socket.close(); @@ -104,7 +104,7 @@ synchronized public void stop() { public void run() { - Log.d(getClass().getName(), "Entering blocking receiving loop, listening for UDP datagrams on: " + socket.getLocalAddress()); + Log.v(getClass().getName(), "Entering blocking receiving loop, listening for UDP datagrams on: " + socket.getLocalAddress()); while (true) { try { @@ -120,7 +120,7 @@ public void run() { datagram.getAddress() ); - Log.d(getClass().getName(), + Log.v(getClass().getName(), "UDP datagram received from: " + datagram.getAddress().getHostAddress() + ":" + datagram.getPort() + " on local interface: " + multicastInterface.getDisplayName() @@ -130,17 +130,17 @@ public void run() { router.received(datagramProcessor.read(receivedOnLocalAddress, datagram)); } catch (SocketException ex) { - Log.d(getClass().getName(), "Socket closed", ex); + Log.v(getClass().getName(), "Socket closed", ex); break; } catch (UnsupportedDataException ex) { - Log.d(getClass().getName(), "Could not read datagram: " + ex.getMessage(), ex); + Log.v(getClass().getName(), "Could not read datagram: " + ex.getMessage(), ex); } catch (Exception ex) { throw new RuntimeException(ex); } } try { if (!socket.isClosed()) { - Log.d(getClass().getName(), "Closing multicast socket"); + Log.v(getClass().getName(), "Closing multicast socket"); socket.close(); } } catch (Exception ex) { diff --git a/yaacc/src/main/java/org/fourthline/cling/transport/impl/NetworkAddressFactoryImpl.java b/yaacc/src/main/java/org/fourthline/cling/transport/impl/NetworkAddressFactoryImpl.java index 42e7d4ef..57b03a92 100644 --- a/yaacc/src/main/java/org/fourthline/cling/transport/impl/NetworkAddressFactoryImpl.java +++ b/yaacc/src/main/java/org/fourthline/cling/transport/impl/NetworkAddressFactoryImpl.java @@ -111,7 +111,7 @@ protected boolean requiresNetworkInterface() { public void logInterfaceInformation() { synchronized (networkInterfaces) { if (networkInterfaces.isEmpty()) { - Log.i(getClass().getName(), "No network interface to display!"); + Log.v(getClass().getName(), "No network interface to display!"); return; } for (NetworkInterface networkInterface : networkInterfaces) { @@ -301,7 +301,7 @@ protected void discoverNetworkInterfaces() throws InitializationException { Log.v(getClass().getName(), "Analyzing network interface: " + iface.getDisplayName()); if (isUsableNetworkInterface(iface)) { - Log.d(getClass().getName(), "Discovered usable network interface: " + iface.getDisplayName()); + Log.v(getClass().getName(), "Discovered usable network interface: " + iface.getDisplayName()); synchronized (networkInterfaces) { networkInterfaces.add(iface); } @@ -340,53 +340,53 @@ protected void discoverNetworkInterfaces() throws InitializationException { */ protected boolean isUsableNetworkInterface(NetworkInterface iface) throws Exception { if (!iface.isUp()) { - Log.i(getClass().getName(), "Skipping network interface (down): " + iface.getDisplayName()); + Log.v(getClass().getName(), "Skipping network interface (down): " + iface.getDisplayName()); return false; } if (getInetAddresses(iface).size() == 0) { - Log.i(getClass().getName(), "Skipping network interface without bound IP addresses: " + iface.getDisplayName()); + Log.v(getClass().getName(), "Skipping network interface without bound IP addresses: " + iface.getDisplayName()); return false; } if (iface.getName().toLowerCase(Locale.ROOT).startsWith("vmnet") || (iface.getDisplayName() != null && iface.getDisplayName().toLowerCase(Locale.ROOT).contains("vmnet"))) { - Log.i(getClass().getName(), "Skipping network interface (VMWare): " + iface.getDisplayName()); + Log.v(getClass().getName(), "Skipping network interface (VMWare): " + iface.getDisplayName()); return false; } if (iface.getName().toLowerCase(Locale.ROOT).startsWith("vnic")) { - Log.i(getClass().getName(), "Skipping network interface (Parallels): " + iface.getDisplayName()); + Log.v(getClass().getName(), "Skipping network interface (Parallels): " + iface.getDisplayName()); return false; } if (iface.getName().toLowerCase(Locale.ROOT).startsWith("vboxnet")) { - Log.i(getClass().getName(), "Skipping network interface (Virtual Box): " + iface.getDisplayName()); + Log.v(getClass().getName(), "Skipping network interface (Virtual Box): " + iface.getDisplayName()); return false; } if (iface.getName().toLowerCase(Locale.ROOT).contains("virtual")) { - Log.i(getClass().getName(), "Skipping network interface (named '*virtual*'): " + iface.getDisplayName()); + Log.v(getClass().getName(), "Skipping network interface (named '*virtual*'): " + iface.getDisplayName()); return false; } if (iface.getName().toLowerCase(Locale.ROOT).startsWith("ppp")) { - Log.i(getClass().getName(), "Skipping network interface (PPP): " + iface.getDisplayName()); + Log.v(getClass().getName(), "Skipping network interface (PPP): " + iface.getDisplayName()); return false; } if (iface.getName().toLowerCase(Locale.ROOT).startsWith("rmnet")) { - Log.i(getClass().getName(), "Skipping network interface (rmnet): " + iface.getDisplayName()); + Log.v(getClass().getName(), "Skipping network interface (rmnet): " + iface.getDisplayName()); return false; } if (iface.isLoopback()) { - Log.i(getClass().getName(), "Skipping network interface (ignoring loopback): " + iface.getDisplayName()); + Log.v(getClass().getName(), "Skipping network interface (ignoring loopback): " + iface.getDisplayName()); return false; } if (useInterfaces.size() > 0 && !useInterfaces.contains(iface.getName())) { - Log.d(getClass().getName(), "Skipping unwanted network interface (-D" + SYSTEM_PROPERTY_NET_IFACES + "): " + iface.getName()); + Log.v(getClass().getName(), "Skipping unwanted network interface (-D" + SYSTEM_PROPERTY_NET_IFACES + "): " + iface.getName()); return false; } @@ -404,7 +404,7 @@ protected void discoverBindAddresses() throws InitializationException { while (it.hasNext()) { NetworkInterface networkInterface = it.next(); - Log.d(getClass().getName(), "Discovering addresses of interface: " + networkInterface.getDisplayName()); + Log.v(getClass().getName(), "Discovering addresses of interface: " + networkInterface.getDisplayName()); int usableAddresses = 0; for (InetAddress inetAddress : getInetAddresses(networkInterface)) { if (inetAddress == null) { @@ -413,18 +413,18 @@ protected void discoverBindAddresses() throws InitializationException { } if (isUsableAddress(networkInterface, inetAddress)) { - Log.d(getClass().getName(), "Discovered usable network interface address: " + inetAddress.getHostAddress()); + Log.v(getClass().getName(), "Discovered usable network interface address: " + inetAddress.getHostAddress()); usableAddresses++; synchronized (bindAddresses) { bindAddresses.add(inetAddress); } } else { - Log.d(getClass().getName(), "Ignoring non-usable network interface address: " + inetAddress.getHostAddress()); + Log.v(getClass().getName(), "Ignoring non-usable network interface address: " + inetAddress.getHostAddress()); } } if (usableAddresses == 0) { - Log.d(getClass().getName(), "Network interface has no usable addresses, removing: " + networkInterface.getDisplayName()); + Log.v(getClass().getName(), "Network interface has no usable addresses, removing: " + networkInterface.getDisplayName()); it.remove(); } } @@ -472,47 +472,47 @@ protected boolean isUsableAddress(NetworkInterface networkInterface, InetAddress } protected void logInterfaceInformation(NetworkInterface networkInterface) throws SocketException { - Log.d(getClass().getName(), "---------------------------------------------------------------------------------"); - Log.d(getClass().getName(), String.format("Interface display name: %s", networkInterface.getDisplayName())); + Log.v(getClass().getName(), "---------------------------------------------------------------------------------"); + Log.v(getClass().getName(), String.format("Interface display name: %s", networkInterface.getDisplayName())); if (networkInterface.getParent() != null) - Log.d(getClass().getName(), String.format("Parent Info: %s", networkInterface.getParent())); - Log.d(getClass().getName(), String.format("Name: %s", networkInterface.getName())); + Log.v(getClass().getName(), String.format("Parent Info: %s", networkInterface.getParent())); + Log.v(getClass().getName(), String.format("Name: %s", networkInterface.getName())); Enumeration inetAddresses = networkInterface.getInetAddresses(); for (InetAddress inetAddress : Collections.list(inetAddresses)) { - Log.d(getClass().getName(), String.format("InetAddress: %s", inetAddress)); + Log.v(getClass().getName(), String.format("InetAddress: %s", inetAddress)); } List interfaceAddresses = networkInterface.getInterfaceAddresses(); for (InterfaceAddress interfaceAddress : interfaceAddresses) { if (interfaceAddress == null) { - Log.d(getClass().getName(), "Skipping null InterfaceAddress!"); + Log.v(getClass().getName(), "Skipping null InterfaceAddress!"); continue; } - Log.d(getClass().getName(), " Interface Address"); - Log.d(getClass().getName(), " Address: " + interfaceAddress.getAddress()); - Log.d(getClass().getName(), " Broadcast: " + interfaceAddress.getBroadcast()); - Log.d(getClass().getName(), " Prefix length: " + interfaceAddress.getNetworkPrefixLength()); + Log.v(getClass().getName(), " Interface Address"); + Log.v(getClass().getName(), " Address: " + interfaceAddress.getAddress()); + Log.v(getClass().getName(), " Broadcast: " + interfaceAddress.getBroadcast()); + Log.v(getClass().getName(), " Prefix length: " + interfaceAddress.getNetworkPrefixLength()); } Enumeration subIfs = networkInterface.getSubInterfaces(); for (NetworkInterface subIf : Collections.list(subIfs)) { if (subIf == null) { - Log.d(getClass().getName(), "Skipping null NetworkInterface sub-interface"); + Log.v(getClass().getName(), "Skipping null NetworkInterface sub-interface"); continue; } - Log.d(getClass().getName(), String.format("\tSub Interface Display name: %s", subIf.getDisplayName())); - Log.d(getClass().getName(), String.format("\tSub Interface Name: %s", subIf.getName())); + Log.v(getClass().getName(), String.format("\tSub Interface Display name: %s", subIf.getDisplayName())); + Log.v(getClass().getName(), String.format("\tSub Interface Name: %s", subIf.getName())); } - Log.d(getClass().getName(), String.format("Up? %s", networkInterface.isUp())); - Log.d(getClass().getName(), String.format("Loopback? %s", networkInterface.isLoopback())); - Log.d(getClass().getName(), String.format("PointToPoint? %s", networkInterface.isPointToPoint())); - Log.d(getClass().getName(), String.format("Supports multicast? %s", networkInterface.supportsMulticast())); - Log.d(getClass().getName(), String.format("Virtual? %s", networkInterface.isVirtual())); - Log.d(getClass().getName(), String.format("Hardware address: %s", Arrays.toString(networkInterface.getHardwareAddress()))); - Log.d(getClass().getName(), String.format("MTU: %s", networkInterface.getMTU())); + Log.v(getClass().getName(), String.format("Up? %s", networkInterface.isUp())); + Log.v(getClass().getName(), String.format("Loopback? %s", networkInterface.isLoopback())); + Log.v(getClass().getName(), String.format("PointToPoint? %s", networkInterface.isPointToPoint())); + Log.v(getClass().getName(), String.format("Supports multicast? %s", networkInterface.supportsMulticast())); + Log.v(getClass().getName(), String.format("Virtual? %s", networkInterface.isVirtual())); + Log.v(getClass().getName(), String.format("Hardware address: %s", Arrays.toString(networkInterface.getHardwareAddress()))); + Log.v(getClass().getName(), String.format("MTU: %s", networkInterface.getMTU())); } } diff --git a/yaacc/src/main/java/org/fourthline/cling/transport/impl/PullGENAEventProcessorImpl.java b/yaacc/src/main/java/org/fourthline/cling/transport/impl/PullGENAEventProcessorImpl.java index 88f60cb0..3a788d5f 100644 --- a/yaacc/src/main/java/org/fourthline/cling/transport/impl/PullGENAEventProcessorImpl.java +++ b/yaacc/src/main/java/org/fourthline/cling/transport/impl/PullGENAEventProcessorImpl.java @@ -43,7 +43,7 @@ public class PullGENAEventProcessorImpl extends GENAEventProcessorImpl { public void readBody(IncomingEventRequestMessage requestMessage) throws UnsupportedDataException { - Log.d(getClass().getName(), "Reading body of: " + requestMessage); + Log.v(getClass().getName(), "Reading body of: " + requestMessage); Log.v(getClass().getName(), "===================================== GENA BODY BEGIN ============================================"); Log.v(getClass().getName(), requestMessage.getBody() != null ? requestMessage.getBody().toString() : null); Log.v(getClass().getName(), "-===================================== GENA BODY END ============================================"); @@ -80,7 +80,7 @@ protected void readProperty(XmlPullParser xpp, IncomingEventRequestMessage messa String stateVariableName = xpp.getName(); for (StateVariable stateVariable : stateVariables) { if (stateVariable.getName().equals(stateVariableName)) { - Log.d(getClass().getName(), "Reading state variable value: " + stateVariableName); + Log.v(getClass().getName(), "Reading state variable value: " + stateVariableName); String value = xpp.nextText(); message.getStateVariableValues().add(new StateVariableValue(stateVariable, value)); break; diff --git a/yaacc/src/main/java/org/fourthline/cling/transport/impl/PullSOAPActionProcessorImpl.java b/yaacc/src/main/java/org/fourthline/cling/transport/impl/PullSOAPActionProcessorImpl.java index 192cc2d8..dd63fac8 100644 --- a/yaacc/src/main/java/org/fourthline/cling/transport/impl/PullSOAPActionProcessorImpl.java +++ b/yaacc/src/main/java/org/fourthline/cling/transport/impl/PullSOAPActionProcessorImpl.java @@ -169,7 +169,7 @@ protected ActionArgumentValue[] readArgumentValues(XmlPullParser xpp, ActionArgu "Could not find argument '" + arg.getName() + "' node"); } - Log.d(getClass().getName(), "Reading action argument: " + arg.getName()); + Log.v(getClass().getName(), "Reading action argument: " + arg.getName()); values[i] = createValue(arg, value); } return values; @@ -209,10 +209,10 @@ protected ActionException readFaultElement(XmlPullParser xpp) throws Exception { int numericCode = Integer.valueOf(errorCode); ErrorCode standardErrorCode = ErrorCode.getByCode(numericCode); if (standardErrorCode != null) { - Log.d(getClass().getName(), "Reading fault element: " + standardErrorCode.getCode() + " - " + errorDescription); + Log.v(getClass().getName(), "Reading fault element: " + standardErrorCode.getCode() + " - " + errorDescription); return new ActionException(standardErrorCode, errorDescription, false); } else { - Log.d(getClass().getName(), "Reading fault element: " + numericCode + " - " + errorDescription); + Log.v(getClass().getName(), "Reading fault element: " + numericCode + " - " + errorDescription); return new ActionException(numericCode, errorDescription); } } catch (NumberFormatException ex) { diff --git a/yaacc/src/main/java/org/fourthline/cling/transport/impl/SOAPActionProcessorImpl.java b/yaacc/src/main/java/org/fourthline/cling/transport/impl/SOAPActionProcessorImpl.java index 24e1d18f..ce6635e8 100644 --- a/yaacc/src/main/java/org/fourthline/cling/transport/impl/SOAPActionProcessorImpl.java +++ b/yaacc/src/main/java/org/fourthline/cling/transport/impl/SOAPActionProcessorImpl.java @@ -62,7 +62,7 @@ protected DocumentBuilderFactory createDocumentBuilderFactory() throws FactoryCo public void writeBody(ActionRequestMessage requestMessage, ActionInvocation actionInvocation) throws UnsupportedDataException { - Log.d(getClass().getName(), "Writing body of " + requestMessage + " for: " + actionInvocation); + Log.v(getClass().getName(), "Writing body of " + requestMessage + " for: " + actionInvocation); try { @@ -85,7 +85,7 @@ public void writeBody(ActionRequestMessage requestMessage, ActionInvocation acti public void writeBody(ActionResponseMessage responseMessage, ActionInvocation actionInvocation) throws UnsupportedDataException { - Log.d(getClass().getName(), "Writing body of " + responseMessage + " for: " + actionInvocation); + Log.v(getClass().getName(), "Writing body of " + responseMessage + " for: " + actionInvocation); try { @@ -111,7 +111,7 @@ public void writeBody(ActionResponseMessage responseMessage, ActionInvocation ac public void readBody(ActionRequestMessage requestMessage, ActionInvocation actionInvocation) throws UnsupportedDataException { - Log.d(getClass().getName(), "Reading body of " + requestMessage + " for: " + actionInvocation); + Log.v(getClass().getName(), "Reading body of " + requestMessage + " for: " + actionInvocation); Log.v(getClass().getName(), "===================================== SOAP BODY BEGIN ============================================"); Log.v(getClass().getName(), requestMessage.getBodyString()); Log.v(getClass().getName(), "-===================================== SOAP BODY END ============================================"); @@ -138,7 +138,7 @@ public void readBody(ActionRequestMessage requestMessage, ActionInvocation actio public void readBody(ActionResponseMessage responseMsg, ActionInvocation actionInvocation) throws UnsupportedDataException { - Log.d(getClass().getName(), "Reading body of " + responseMsg + " for: " + actionInvocation); + Log.v(getClass().getName(), "Reading body of " + responseMsg + " for: " + actionInvocation); Log.v(getClass().getName(), "===================================== SOAP BODY BEGIN ============================================"); Log.v(getClass().getName(), responseMsg.getBodyString()); Log.v(getClass().getName(), "-===================================== SOAP BODY END ============================================"); @@ -269,7 +269,7 @@ protected Element writeActionRequestElement(Document d, ActionRequestMessage message, ActionInvocation actionInvocation) { - Log.d(getClass().getName(), "Writing action request element: " + actionInvocation.getAction().getName()); + Log.v(getClass().getName(), "Writing action request element: " + actionInvocation.getAction().getName()); Element actionRequestElement = d.createElementNS( message.getActionNamespace(), @@ -285,7 +285,7 @@ protected Element readActionRequestElement(Element bodyElement, ActionInvocation actionInvocation) { NodeList bodyChildren = bodyElement.getChildNodes(); - Log.d(getClass().getName(), "Looking for action request element matching namespace:" + message.getActionNamespace()); + Log.v(getClass().getName(), "Looking for action request element matching namespace:" + message.getActionNamespace()); for (int i = 0; i < bodyChildren.getLength(); i++) { Node bodyChild = bodyChildren.item(i); @@ -300,7 +300,7 @@ protected Element readActionRequestElement(Element bodyElement, throw new UnsupportedDataException( "Illegal or missing namespace on action request element: " + bodyChild ); - Log.d(getClass().getName(), "Reading action request element: " + unprefixedName); + Log.v(getClass().getName(), "Reading action request element: " + unprefixedName); return (Element) bodyChild; } } @@ -316,7 +316,7 @@ protected Element writeActionResponseElement(Document d, ActionResponseMessage message, ActionInvocation actionInvocation) { - Log.d(getClass().getName(), "Writing action response element: " + actionInvocation.getAction().getName()); + Log.v(getClass().getName(), "Writing action response element: " + actionInvocation.getAction().getName()); Element actionResponseElement = d.createElementNS( message.getActionNamespace(), "u:" + actionInvocation.getAction().getName() + "Response" @@ -336,11 +336,11 @@ protected Element readActionResponseElement(Element bodyElement, ActionInvocatio continue; if (getUnprefixedNodeName(bodyChild).equals(actionInvocation.getAction().getName() + "Response")) { - Log.d(getClass().getName(), "Reading action response element: " + getUnprefixedNodeName(bodyChild)); + Log.v(getClass().getName(), "Reading action response element: " + getUnprefixedNodeName(bodyChild)); return (Element) bodyChild; } } - Log.d(getClass().getName(), "Could not read action response element"); + Log.v(getClass().getName(), "Could not read action response element"); return null; } @@ -351,7 +351,7 @@ protected void writeActionInputArguments(Document d, ActionInvocation actionInvocation) { for (ActionArgument argument : actionInvocation.getAction().getInputArguments()) { - Log.d(getClass().getName(), "Writing action input argument: " + argument.getName()); + Log.v(getClass().getName(), "Writing action input argument: " + argument.getName()); String value = actionInvocation.getInput(argument) != null ? actionInvocation.getInput(argument).toString() : ""; XMLUtil.appendNewElement(d, actionRequestElement, argument.getName(), value); } @@ -374,7 +374,7 @@ protected void writeActionOutputArguments(Document d, ActionInvocation actionInvocation) { for (ActionArgument argument : actionInvocation.getAction().getOutputArguments()) { - Log.d(getClass().getName(), "Writing action output argument: " + argument.getName()); + Log.v(getClass().getName(), "Writing action output argument: " + argument.getName()); String value = actionInvocation.getOutput(argument) != null ? actionInvocation.getOutput(argument).toString() : ""; XMLUtil.appendNewElement(d, actionResponseElement, argument.getName(), value); } @@ -411,7 +411,7 @@ protected void writeFaultElement(Document d, Element bodyElement, ActionInvocati int errorCode = actionInvocation.getFailure().getErrorCode(); String errorDescription = actionInvocation.getFailure().getMessage(); - Log.d(getClass().getName(), "Writing fault element: " + errorCode + " - " + errorDescription); + Log.v(getClass().getName(), "Writing fault element: " + errorCode + " - " + errorDescription); XMLUtil.appendNewElement(d, upnpErrorElement, "errorCode", Integer.toString(errorCode)); XMLUtil.appendNewElement(d, upnpErrorElement, "errorDescription", errorDescription); @@ -480,10 +480,10 @@ protected ActionException readFaultElement(Element bodyElement) { int numericCode = Integer.valueOf(errorCode); ErrorCode standardErrorCode = ErrorCode.getByCode(numericCode); if (standardErrorCode != null) { - Log.d(getClass().getName(), "Reading fault element: " + standardErrorCode.getCode() + " - " + errorDescription); + Log.v(getClass().getName(), "Reading fault element: " + standardErrorCode.getCode() + " - " + errorDescription); return new ActionException(standardErrorCode, errorDescription, false); } else { - Log.d(getClass().getName(), "Reading fault element: " + numericCode + " - " + errorDescription); + Log.v(getClass().getName(), "Reading fault element: " + numericCode + " - " + errorDescription); return new ActionException(numericCode, errorDescription); } } catch (NumberFormatException ex) { @@ -545,7 +545,7 @@ protected ActionArgumentValue[] readArgumentValues(NodeList nodeList, ActionArgu ErrorCode.ARGUMENT_VALUE_INVALID, "Could not find argument '" + arg.getName() + "' node"); } - Log.d(getClass().getName(), "Reading action argument: " + arg.getName()); + Log.v(getClass().getName(), "Reading action argument: " + arg.getName()); String value = XMLUtil.getTextContent(node); values[i] = createValue(arg, value); } diff --git a/yaacc/src/main/java/org/fourthline/cling/transport/spi/AbstractStreamClient.java b/yaacc/src/main/java/org/fourthline/cling/transport/spi/AbstractStreamClient.java index 15193a42..af2bccd5 100644 --- a/yaacc/src/main/java/org/fourthline/cling/transport/spi/AbstractStreamClient.java +++ b/yaacc/src/main/java/org/fourthline/cling/transport/spi/AbstractStreamClient.java @@ -38,8 +38,8 @@ public abstract class AbstractStreamClient 0 && elapsed > getConfiguration().getLogWarningSeconds() * 1000) { Log.w(getClass().getName(), "HTTP request took a long time (" + elapsed + "ms): " + requestMessage); @@ -77,13 +77,13 @@ && elapsed > getConfiguration().getLogWarningSeconds() * 1000) { } catch (InterruptedException ex) { - Log.d(getClass().getName(), "Interruption, aborting request: " + requestMessage); + Log.v(getClass().getName(), "Interruption, aborting request: " + requestMessage); abort(request, "Interruption, aborting request: " + requestMessage); throw new InterruptedException("HTTP request interrupted and aborted"); } catch (TimeoutException ex) { - Log.i(getClass().getName(), + Log.v(getClass().getName(), "Timeout of " + getConfiguration().getTimeoutSeconds() + " seconds while waiting for HTTP request to complete, aborting: " + requestMessage ); diff --git a/yaacc/src/main/java/org/fourthline/cling/transport/spi/UpnpStream.java b/yaacc/src/main/java/org/fourthline/cling/transport/spi/UpnpStream.java index 2691a463..212e97eb 100644 --- a/yaacc/src/main/java/org/fourthline/cling/transport/spi/UpnpStream.java +++ b/yaacc/src/main/java/org/fourthline/cling/transport/spi/UpnpStream.java @@ -68,7 +68,7 @@ public ProtocolFactory getProtocolFactory() { * @return The TCP (HTTP) stream response message, or null if a 404 should be send to the client. */ public StreamResponseMessage process(StreamRequestMessage requestMsg) { - Log.d(getClass().getName(), "Processing stream request message: " + requestMsg); + Log.v(getClass().getName(), "Processing stream request message: " + requestMsg); try { // Try to get a protocol implementation that matches the request message @@ -79,7 +79,7 @@ public StreamResponseMessage process(StreamRequestMessage requestMsg) { } // Run it - Log.d(getClass().getName(), "Running protocol for synchronous message processing: " + syncProtocol); + Log.v(getClass().getName(), "Running protocol for synchronous message processing: " + syncProtocol); syncProtocol.run(); // ... then grab the response diff --git a/yaacc/src/main/java/org/seamless/statemachine/StateMachineInvocationHandler.java b/yaacc/src/main/java/org/seamless/statemachine/StateMachineInvocationHandler.java index fe36de27..6c1fa31a 100644 --- a/yaacc/src/main/java/org/seamless/statemachine/StateMachineInvocationHandler.java +++ b/yaacc/src/main/java/org/seamless/statemachine/StateMachineInvocationHandler.java @@ -40,7 +40,7 @@ public class StateMachineInvocationHandler implements InvocationHandler { Class[] constructorArgumentTypes, Object[] constructorArguments) { - Log.d(getClass().getName(), "Creating state machine with initial state: " + initialStateClass); + Log.v(getClass().getName(), "Creating state machine with initial state: " + initialStateClass); this.initialStateClass = initialStateClass; @@ -54,7 +54,7 @@ public class StateMachineInvocationHandler implements InvocationHandler { .newInstance(constructorArguments) : stateClass.newInstance(); - Log.d(getClass().getName(), "Adding state instance: " + state.getClass().getName()); + Log.v(getClass().getName(), "Adding state instance: " + state.getClass().getName()); stateObjects.put(stateClass, state); } catch (NoSuchMethodException ex) { @@ -101,13 +101,13 @@ public Object invoke(Object proxy, Method method, Object[] args) throws Throwabl } Method signalMethod = getMethodOfCurrentState(method); - Log.d(getClass().getName(), "Invoking signal method of current state: " + signalMethod.toString()); + Log.v(getClass().getName(), "Invoking signal method of current state: " + signalMethod.toString()); Object methodReturn = signalMethod.invoke(currentState, args); if (methodReturn != null && methodReturn instanceof Class) { Class nextStateClass = (Class) methodReturn; if (stateObjects.containsKey(nextStateClass)) { - Log.d(getClass().getName(), "Executing transition to next state: " + nextStateClass.getName()); + Log.v(getClass().getName(), "Executing transition to next state: " + nextStateClass.getName()); invokeExitMethod(currentState); currentState = stateObjects.get(nextStateClass); invokeEntryMethod(currentState); @@ -131,7 +131,7 @@ private Method getMethodOfCurrentState(Method method) { } private void invokeEntryMethod(Object state) { - Log.d(getClass().getName(), "Trying to invoke entry method of state: " + state.getClass().getName()); + Log.v(getClass().getName(), "Trying to invoke entry method of state: " + state.getClass().getName()); try { Method onEntryMethod = state.getClass().getMethod(METHOD_ON_ENTRY); onEntryMethod.invoke(state); diff --git a/yaacc/src/main/java/org/seamless/xml/CatalogResourceResolver.java b/yaacc/src/main/java/org/seamless/xml/CatalogResourceResolver.java index 18ec1930..6aa50ce0 100644 --- a/yaacc/src/main/java/org/seamless/xml/CatalogResourceResolver.java +++ b/yaacc/src/main/java/org/seamless/xml/CatalogResourceResolver.java @@ -46,10 +46,10 @@ public CatalogResourceResolver(Map catalog) { } public LSInput resolveResource(String type, String namespaceURI, String publicId, String systemId, String baseURI) { - Log.i(getClass().getName(), "Trying to resolve system identifier URI in catalog: " + systemId); + Log.v(getClass().getName(), "Trying to resolve system identifier URI in catalog: " + systemId); URL systemURL; if ((systemURL = catalog.get(URI.create(systemId))) != null) { - Log.i(getClass().getName(), "Loading catalog resource: " + systemURL); + Log.v(getClass().getName(), "Loading catalog resource: " + systemURL); try { Input i = new Input(systemURL.openStream()); i.setBaseURI(baseURI); @@ -60,7 +60,7 @@ public LSInput resolveResource(String type, String namespaceURI, String publicId throw new RuntimeException(ex); } } - Log.i(getClass().getName(), + Log.v(getClass().getName(), "System identifier not found in catalog, continuing with default resolution " + "(this most likely means remote HTTP request!): " + systemId ); diff --git a/yaacc/src/main/java/org/seamless/xml/DOMParser.java b/yaacc/src/main/java/org/seamless/xml/DOMParser.java index 66f7e8c7..cd3bd7c4 100644 --- a/yaacc/src/main/java/org/seamless/xml/DOMParser.java +++ b/yaacc/src/main/java/org/seamless/xml/DOMParser.java @@ -281,13 +281,13 @@ public D parse(InputSource source, boolean validate) throws ParserException { public void validate(URL url) throws ParserException { if (url == null) throw new IllegalArgumentException("Can't validate null URL"); - Log.d(getClass().getName(), "Validating XML of URL: " + url); + Log.v(getClass().getName(), "Validating XML of URL: " + url); validate(new StreamSource(url.toString())); } public void validate(String string) throws ParserException { if (string == null) throw new IllegalArgumentException("Can't validate null string"); - Log.d(getClass().getName(), "Validating XML string characters: " + string.length()); + Log.v(getClass().getName(), "Validating XML string characters: " + string.length()); validate(new SAXSource(new InputSource(new StringReader(string)))); } @@ -337,7 +337,7 @@ public Object getXPathResult(DOMElement element, XPath xpath, String expr, QName public Object getXPathResult(Node context, XPath xpath, String expr, QName result) { try { - Log.d(getClass().getName(), "Evaluating xpath query: " + expr); + Log.v(getClass().getName(), "Evaluating xpath query: " + expr); return xpath.evaluate(expr, context, result); } catch (Exception ex) { throw new RuntimeException(ex); diff --git a/yaacc/src/main/java/org/seamless/xml/SAXParser.java b/yaacc/src/main/java/org/seamless/xml/SAXParser.java index 68eb0ada..b21f48b8 100644 --- a/yaacc/src/main/java/org/seamless/xml/SAXParser.java +++ b/yaacc/src/main/java/org/seamless/xml/SAXParser.java @@ -74,12 +74,12 @@ protected XMLReader create() { try { factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); } catch (SAXNotRecognizedException ex) { - Log.i(getClass().getName(), "Feature disallow-doctype-decl not known"); + Log.v(getClass().getName(), "Feature disallow-doctype-decl not known"); } try { factory.setXIncludeAware(false); } catch (UnsupportedOperationException usex) { - Log.i(getClass().getName(), "can't set factory.setXIncludeAware(false);"); + Log.v(getClass().getName(), "can't set factory.setXIncludeAware(false);"); } factory.setNamespaceAware(true); diff --git a/yaacc/src/main/java/org/seamless/xml/XmlPullParserUtils.java b/yaacc/src/main/java/org/seamless/xml/XmlPullParserUtils.java index 3ed423da..3a85bb43 100644 --- a/yaacc/src/main/java/org/seamless/xml/XmlPullParserUtils.java +++ b/yaacc/src/main/java/org/seamless/xml/XmlPullParserUtils.java @@ -144,7 +144,7 @@ public static String fixXMLEntities(String xml) { } if (isFixed) { - Log.d(XmlPullParser.class.getName(), "fixed badly encoded entities in XML"); + Log.v(XmlPullParser.class.getName(), "fixed badly encoded entities in XML"); } return fixedXml.toString();