Skip to content

Commit c110669

Browse files
harismsophokles73
authored andcommitted
Revert "[eclipse-hono#3656] Add Message Tracing logs"
This reverts commit b94163d.
1 parent b94163d commit c110669

File tree

4 files changed

+0
-48
lines changed

4 files changed

+0
-48
lines changed

adapters/coap/src/main/java/org/eclipse/hono/adapter/coap/AbstractVertxBasedCoapAdapter.java

-7
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import org.eclipse.californium.core.CoapServer;
2121
import org.eclipse.californium.core.coap.CoAP;
2222
import org.eclipse.californium.core.network.Endpoint;
23-
import org.eclipse.californium.core.network.interceptors.MessageTracer;
2423
import org.eclipse.californium.core.server.resources.Resource;
2524
import org.eclipse.hono.adapter.AbstractProtocolAdapterBase;
2625
import org.eclipse.hono.util.Constants;
@@ -199,19 +198,13 @@ protected Resource createRoot() {
199198
final Future<Endpoint> secureEndpointFuture = endpointFactory.getSecureEndpoint()
200199
.onFailure(t -> log.info("not creating secure endpoint: {}", t.getMessage()))
201200
.onSuccess(ep -> {
202-
if (getConfig().isMessageTracingLogEnabled()) {
203-
ep.addInterceptor(new MessageTracer());
204-
}
205201
ep.addInterceptor(internalErrorTracer);
206202
newServer.addEndpoint(ep);
207203
this.secureEndpoint = ep;
208204
});
209205
final Future<Endpoint> insecureEndpointFuture = endpointFactory.getInsecureEndpoint()
210206
.onFailure(t -> log.info("not creating insecure endpoint: {}", t.getMessage()))
211207
.onSuccess(ep -> {
212-
if (getConfig().isMessageTracingLogEnabled()) {
213-
ep.addInterceptor(new MessageTracer());
214-
}
215208
ep.addInterceptor(internalErrorTracer);
216209
newServer.addEndpoint(ep);
217210
this.insecureEndpoint = ep;

adapters/coap/src/main/java/org/eclipse/hono/adapter/coap/CoapAdapterOptions.java

-10
Original file line numberDiff line numberDiff line change
@@ -152,14 +152,4 @@ public interface CoapAdapterOptions {
152152
*/
153153
@WithDefault("500")
154154
int timeoutToAck();
155-
156-
/**
157-
* Checks, if message tracing log is enabled.
158-
* <p>
159-
* When enabled, the CoAP adapter will log all incoming and outgoing messages tracing information.
160-
*
161-
* @return {@code true} enable message tracing log, {@code false} disable message tracing log.
162-
*/
163-
@WithDefault("false")
164-
boolean messageTracingLogEnabled();
165155
}

adapters/coap/src/main/java/org/eclipse/hono/adapter/coap/CoapAdapterProperties.java

-30
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,6 @@ public class CoapAdapterProperties extends ProtocolAdapterProperties {
6666
* that time, the status gets removed and a new request will fail.
6767
*/
6868
public static final int DEFAULT_BLOCKWISE_STATUS_LIFETIME = 300000;
69-
/**
70-
* The default for message tracing log. When message tracing is enabled, the CoAP adapter
71-
* will log all incoming and outgoing messages. This is useful for debugging purposes.
72-
*/
73-
public static final boolean DEFAULT_MESSAGE_TRACING_LOG = false;
7469

7570
static {
7671
DEFAULT_CONNECTOR_THREADS = 2;
@@ -96,7 +91,6 @@ public class CoapAdapterProperties extends ProtocolAdapterProperties {
9691
private int blockwiseStatusLifetime = DEFAULT_BLOCKWISE_STATUS_LIFETIME;
9792
private boolean messageOffloadingEnabled = DEFAULT_MESSAGE_OFFLOADING;
9893
private int timeoutToAck = DEFAULT_TIMEOUT_TO_ACK;
99-
private boolean messageTracingLogEnabled = DEFAULT_MESSAGE_TRACING_LOG;
10094

10195
/**
10296
* Creates properties using default values.
@@ -123,7 +117,6 @@ public CoapAdapterProperties(final CoapAdapterOptions options) {
123117
this.networkConfig = options.networkConfig().orElse(null);
124118
this.secureNetworkConfig = options.secureNetworkConfig().orElse(null);
125119
setTimeoutToAck(options.timeoutToAck());
126-
this.messageTracingLogEnabled = options.messageTracingLogEnabled();
127120
}
128121

129122
/**
@@ -473,27 +466,4 @@ public final void setTimeoutToAck(final int timeoutToAck) {
473466
}
474467
this.timeoutToAck = timeoutToAck;
475468
}
476-
477-
/**
478-
* Returns the current message tracing log mode.
479-
* <p>
480-
* When message tracing is enabled, the CoAP adapter will log all incoming and outgoing messages.
481-
* <p>
482-
* @return {@code true} if message tracing log is enabled, {@code false} if it's disabled.
483-
*/
484-
public final boolean isMessageTracingLogEnabled() {
485-
return messageTracingLogEnabled;
486-
}
487-
488-
/**
489-
* Sets the message tracing log mode.
490-
* <p>
491-
* When message tracing is enabled, the CoAP adapter will log all incoming and outgoing messages.
492-
* Setting this property has effect only during the application startup.
493-
* <p>
494-
* @param messageTracingLog {@code true} enable message tracing log, {@code false} disable message tracing log.
495-
*/
496-
public final void setMessageTracingLogEnabled(final boolean messageTracingLog) {
497-
this.messageTracingLogEnabled = messageTracingLog;
498-
}
499469
}

site/documentation/content/admin-guide/coap-adapter-config.md

-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ configuring the CoAP adapter.
4545
| `HONO_COAP_MAXCONNECTIONS`<br>`hono.coap.maxConnections` | no | `0` | The maximum number of concurrent DTLS connections that the protocol adapter should accept. If set to `0`, the protocol adapter determines a reasonable value based on the available resources like memory and CPU. |
4646
| `HONO_COAP_MAXPAYLOADSIZE`<br>`hono.coap.maxPayloadSize` | no | `2048` | The maximum allowed size of an incoming CoAP request's body in bytes. Requests with a larger body size are rejected with a 4.13 `Request entity too large` response. |
4747
| `HONO_COAP_MESSAGEOFFLOADINGENABLED`<br>`hono.coap.messageOffloadingEnabled` | no | true | Enables to clear payload and serialized messages kept for deduplication in order to reduce the heap consumption. Experimental. |
48-
| `HONO_COAP_MESSAGETRACINGLOGENABLED`<br>`hono.coap.messageTracingLogEnabled` | no | `false` | If set to `true` the protocol adapter will start to log every incoming and outgoing CoAP messages with tracing information (message connection information, request code, confirmable and confirmed details, MID, token, options, status and the payload partially). |
4948
| `HONO_COAP_NETWORKCONFIG`<br>`hono.coap.networkConfig` | no | - | The absolute path to a Californium properties file containing network configuration properties that should be used for the insecure and secure CoAP port. If not set, Californium's default properties will be used. Values may be overwritten using the specific `HONO_COAP_INSECURENETWORKCONFIG` or `HONO_COAP_SECURENETWORKCONFIG`. If the file is not available, not readable or malformed, the adapter will fail to start. |
5049
| `HONO_COAP_PORT`<br>`hono.coap.port` | no | - | The secure port that the protocol adapter should listen on.<br>See [Port Configuration]({{< relref "#port-configuration" >}}) below for details. |
5150
| `HONO_COAP_SECURENETWORKCONFIG`<br>`hono.coap.secureNetworkConfig` | no | - | The absolute path to a Californium properties file containing network configuration properties that should be used for the secure CoAP port. If not set, Californium's default properties will be used. If the file is not available, not readable or malformed, the adapter will fail to start. |

0 commit comments

Comments
 (0)