diff --git a/core/src/main/java/com/microsoft/applicationinsights/internal/channel/common/TransmissionFileSystemOutput.java b/core/src/main/java/com/microsoft/applicationinsights/internal/channel/common/TransmissionFileSystemOutput.java index e113a2988bd..d25e93cdcd6 100644 --- a/core/src/main/java/com/microsoft/applicationinsights/internal/channel/common/TransmissionFileSystemOutput.java +++ b/core/src/main/java/com/microsoft/applicationinsights/internal/channel/common/TransmissionFileSystemOutput.java @@ -135,7 +135,7 @@ public TransmissionFileSystemOutput(String folderPath) { @Override public boolean send(Transmission transmission) { if (size.get() >= capacityInKB) { - InternalLogger.INSTANCE.logAlways(InternalLogger.LoggingLevel.WARN, "Persistent storage max capcity has been reached; currently at %s KB. Telemetry will be lost, please set the MaxTransmissionStorageFilesCapacityInMB property in the configuration file.", size.get()); + InternalLogger.INSTANCE.logAlways(InternalLogger.LoggingLevel.WARN, "Persistent storage max capacity has been reached; currently at %s KB. Telemetry will be lost, please set the MaxTransmissionStorageFilesCapacityInMB property in the configuration file.", size.get()); return false; } @@ -152,7 +152,7 @@ public boolean send(Transmission transmission) { return false; } - InternalLogger.INSTANCE.logAlways(InternalLogger.LoggingLevel.TRACE, "Persistent storage saved permanent file; data will be persisted and sent when the network is available."); + InternalLogger.INSTANCE.info("Data persisted to file. To be sent when the network is available."); return true; } diff --git a/core/src/main/java/com/microsoft/applicationinsights/internal/channel/common/TransmissionPolicyManager.java b/core/src/main/java/com/microsoft/applicationinsights/internal/channel/common/TransmissionPolicyManager.java index 8f847fad330..e14c464ebdb 100644 --- a/core/src/main/java/com/microsoft/applicationinsights/internal/channel/common/TransmissionPolicyManager.java +++ b/core/src/main/java/com/microsoft/applicationinsights/internal/channel/common/TransmissionPolicyManager.java @@ -112,9 +112,9 @@ public void backoff() { long backOffMillis = backoffManager.backOffCurrentSenderThreadValue(); if (backOffMillis > 0) { - long backOffSeconds = backOffMillis / 1000; - InternalLogger.INSTANCE.logAlways(InternalLogger.LoggingLevel.TRACE, "App is throttled, telemetry will be blocked for %s seconds.", backOffSeconds); - this.suspendInSeconds(TransmissionPolicy.BACKOFF, backOffSeconds); + long backOffSeconds = backOffMillis / 1000; + InternalLogger.INSTANCE.info("App is throttled, telemetry will be blocked for %s seconds.", backOffSeconds); + this.suspendInSeconds(TransmissionPolicy.BACKOFF, backOffSeconds); } } @@ -124,7 +124,7 @@ public void backoff() { public void clearBackoff() { policyState.setCurrentState(TransmissionPolicy.UNBLOCKED); backoffManager.onDoneSending(); - InternalLogger.INSTANCE.logAlways(InternalLogger.LoggingLevel.TRACE, "Backoff has been reset."); + InternalLogger.INSTANCE.info("Backoff has been reset."); } /** @@ -181,7 +181,7 @@ private synchronized void doSuspend(TransmissionPolicy policy, long suspendInSec policyState.setCurrentState(policy); suspensionDate = date; - InternalLogger.INSTANCE.logAlways(InternalLogger.LoggingLevel.TRACE, "App is throttled, telemetries are blocked from now, for %s seconds", suspendInSeconds); + InternalLogger.INSTANCE.info("App is throttled, telemetries are blocked from now, for %s seconds", suspendInSeconds); } catch (Throwable t) { InternalLogger.INSTANCE.logAlways(InternalLogger.LoggingLevel.ERROR, "App is throttled but failed to block transmission exception: %s", t.getMessage()); } @@ -194,7 +194,7 @@ private synchronized void cancelSuspension(long expectedGeneration) { policyState.setCurrentState(TransmissionPolicy.UNBLOCKED); suspensionDate = null; - InternalLogger.INSTANCE.logAlways(InternalLogger.LoggingLevel.TRACE, "App is throttled is cancelled"); + InternalLogger.INSTANCE.info("App throttling is cancelled."); } private synchronized void createScheduler() {