From 941e1eff5a8801a2f14024f802405af8be5ac4ee Mon Sep 17 00:00:00 2001 From: Chris Jackson Date: Sun, 8 Dec 2024 09:18:07 +1300 Subject: [PATCH] Reduce some logging (#1451) Signed-off-by: Chris Jackson --- .../zsmartsystems/zigbee/dongle/ember/EmberNcp.java | 3 +-- .../dongle/ember/internal/ash/AshFrameHandler.java | 4 ++-- .../zigbee/transaction/ZigBeeTransactionManager.java | 10 +++++----- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/com.zsmartsystems.zigbee.dongle.ember/src/main/java/com/zsmartsystems/zigbee/dongle/ember/EmberNcp.java b/com.zsmartsystems.zigbee.dongle.ember/src/main/java/com/zsmartsystems/zigbee/dongle/ember/EmberNcp.java index cd33c2365..28c99c1c9 100644 --- a/com.zsmartsystems.zigbee.dongle.ember/src/main/java/com/zsmartsystems/zigbee/dongle/ember/EmberNcp.java +++ b/com.zsmartsystems.zigbee.dongle.ember/src/main/java/com/zsmartsystems/zigbee/dongle/ember/EmberNcp.java @@ -225,7 +225,6 @@ public EzspVersionResponse getVersion() { logger.debug("No response from ezspVersion command"); return null; } - logger.debug(response.toString()); lastStatus = null; return response; @@ -528,7 +527,7 @@ public EzspStatus setConfiguration(EzspConfigId configId, Integer value) { EzspSetConfigurationValueRequest request = new EzspSetConfigurationValueRequest(); request.setConfigId(configId); request.setValue(value); - logger.debug(request.toString()); + logger.trace(request.toString()); EzspTransaction transaction = protocolHandler.sendEzspTransaction( new EzspSingleResponseTransaction(request, EzspSetConfigurationValueResponse.class)); diff --git a/com.zsmartsystems.zigbee.dongle.ember/src/main/java/com/zsmartsystems/zigbee/dongle/ember/internal/ash/AshFrameHandler.java b/com.zsmartsystems.zigbee.dongle.ember/src/main/java/com/zsmartsystems/zigbee/dongle/ember/internal/ash/AshFrameHandler.java index e846bafae..6e10ffb56 100644 --- a/com.zsmartsystems.zigbee.dongle.ember/src/main/java/com/zsmartsystems/zigbee/dongle/ember/internal/ash/AshFrameHandler.java +++ b/com.zsmartsystems.zigbee.dongle.ember/src/main/java/com/zsmartsystems/zigbee/dongle/ember/internal/ash/AshFrameHandler.java @@ -285,7 +285,7 @@ public void run() { responseFrame = new AshFrameNak(ackNum); } } else { - logger.debug("<-- RX ASH frame: {}", packet); + logger.trace("<-- RX ASH frame: {}", packet); // Reset the exception counter exceptionCnt = 0; @@ -568,7 +568,7 @@ private void sendRetry() { // Synchronize this method to ensure a packet gets sent as a block private synchronized void outputFrame(AshFrame ashFrame) { ashFrame.setAckNum(ackNum); - logger.debug("--> TX ASH frame: {}", ashFrame); + logger.trace("--> TX ASH frame: {}", ashFrame); // Send the data int[] outputBuffer = ashFrame.getOutputBuffer(); diff --git a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/transaction/ZigBeeTransactionManager.java b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/transaction/ZigBeeTransactionManager.java index 4ac2f1943..cc9e4f3f9 100644 --- a/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/transaction/ZigBeeTransactionManager.java +++ b/com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/transaction/ZigBeeTransactionManager.java @@ -447,7 +447,7 @@ private void send(ZigBeeTransaction transaction) { if (transaction.getTransactionId() == null) { transaction.setTransactionId(transactionIdCounter.getAndIncrement() & 0xff); } - logger.debug("{}: Sending {}", transaction.getIeeeAddress(), transaction); + logger.trace("{}: Sending {}", transaction.getIeeeAddress(), transaction); addTransactionListener(transaction); networkManager.sendCommand(transaction.startTransaction()); } @@ -520,7 +520,7 @@ protected ScheduledFuture scheduleTask(Runnable runnableTask, long delay) { * @param state the {@link TransactionState} of the transaction on completion */ protected void transactionComplete(ZigBeeTransaction transaction, TransactionState state) { - logger.debug("Transaction complete: {}", transaction); + logger.trace("Transaction complete: {}", transaction); removeTransactionListener(transaction); if (isShutdown) { @@ -555,7 +555,7 @@ protected void transactionComplete(ZigBeeTransaction transaction, TransactionSta * @param command the {@link ZigBeeCommand} to send to the transactions */ private void notifyTransactionCommand(final ZigBeeCommand command) { - logger.debug("notifyTransactionCommand: {} ", command); + logger.trace("notifyTransactionCommand: {} ", command); synchronized (outstandingTransactions) { // Notify the listeners for (final ZigBeeTransaction transaction : outstandingTransactions) { @@ -615,7 +615,7 @@ public void removeNode(IeeeAddress address) { } queue.shutdown(); - logger.debug("{}: Removing queue from transaction manager", address); + logger.trace("{}: Removing queue from transaction manager", address); // Remove any outstanding transactions from this queue that have already been sent synchronized (outstandingTransactions) { @@ -639,7 +639,7 @@ public void removeNode(IeeeAddress address) { */ private void sendNextTransaction() { synchronized (this) { - logger.debug( + logger.trace( "Transaction Manager: Send Next transaction. outstandingTransactions={}, outstandingQueues={}, sleepy={}/{}", outstandingTransactions.size(), outstandingQueues.size(), sleepyTransactions, maxSleepyTransactions);