diff --git a/src/Agent/NewRelic/Agent/Core/Config/Configuration.cs b/src/Agent/NewRelic/Agent/Core/Config/Configuration.cs index 3cc7523cb1..6204f7fd4e 100644 --- a/src/Agent/NewRelic/Agent/Core/Config/Configuration.cs +++ b/src/Agent/NewRelic/Agent/Core/Config/Configuration.cs @@ -5063,12 +5063,12 @@ public partial class configurationApplicationLoggingForwarding /// public configurationApplicationLoggingForwarding() { - this.enabledField = false; + this.enabledField = true; this.maxSamplesStoredField = 10000; } [System.Xml.Serialization.XmlAttributeAttribute()] - [System.ComponentModel.DefaultValueAttribute(false)] + [System.ComponentModel.DefaultValueAttribute(true)] public bool enabled { get diff --git a/src/Agent/NewRelic/Agent/Core/Config/Configuration.xsd b/src/Agent/NewRelic/Agent/Core/Config/Configuration.xsd index 83337297d5..2c38247563 100644 --- a/src/Agent/NewRelic/Agent/Core/Config/Configuration.xsd +++ b/src/Agent/NewRelic/Agent/Core/Config/Configuration.xsd @@ -1615,7 +1615,7 @@ - + Controls whether or not log forwarding occurs. Defaults to false. diff --git a/tests/Agent/IntegrationTests/IntegrationTests/Logging/HSMOrCSPDisablesForwardingTests.cs b/tests/Agent/IntegrationTests/IntegrationTests/Logging/HSMOrCSPDisablesForwardingTests.cs index 719d2b051c..ceba960eaa 100644 --- a/tests/Agent/IntegrationTests/IntegrationTests/Logging/HSMOrCSPDisablesForwardingTests.cs +++ b/tests/Agent/IntegrationTests/IntegrationTests/Logging/HSMOrCSPDisablesForwardingTests.cs @@ -35,10 +35,8 @@ public HSMOrCSPDisablesForwardingTestsBase(TFixture fixture, ITestOutputHelper o { var configModifier = new NewRelicConfigModifier(fixture.DestinationNewRelicConfigFilePath); + // applicationLogging metrics and forwarding enabled by default configModifier - .EnableApplicationLogging() - .EnableLogForwarding() - .EnableLogMetrics() .EnableDistributedTrace() .SetLogLevel("debug"); diff --git a/tests/Agent/IntegrationTests/IntegrationTests/Logging/LocalDecorationTests.cs b/tests/Agent/IntegrationTests/IntegrationTests/Logging/LocalDecorationTests.cs index 366a7cd2f9..7047b063d1 100644 --- a/tests/Agent/IntegrationTests/IntegrationTests/Logging/LocalDecorationTests.cs +++ b/tests/Agent/IntegrationTests/IntegrationTests/Logging/LocalDecorationTests.cs @@ -45,7 +45,6 @@ public LocalDecorationTestsBase(TFixture fixture, ITestOutputHelper output, bool var configModifier = new NewRelicConfigModifier(fixture.DestinationNewRelicConfigFilePath); configModifier - .EnableApplicationLogging() .EnableLogDecoration(_decorationEnabled) .EnableDistributedTrace() .SetLogLevel("debug"); diff --git a/tests/Agent/IntegrationTests/IntegrationTests/Logging/MaxSamplesStoredTests.cs b/tests/Agent/IntegrationTests/IntegrationTests/Logging/MaxSamplesStoredTests.cs index a0717a3b3c..0f196bb1dc 100644 --- a/tests/Agent/IntegrationTests/IntegrationTests/Logging/MaxSamplesStoredTests.cs +++ b/tests/Agent/IntegrationTests/IntegrationTests/Logging/MaxSamplesStoredTests.cs @@ -34,10 +34,8 @@ public MaxSamplesStoredTestsBase(TFixture fixture, ITestOutputHelper output, Log { var configModifier = new NewRelicConfigModifier(fixture.DestinationNewRelicConfigFilePath); + // applicationLogging metrics and forwarding enabled by default configModifier - .EnableApplicationLogging() - .EnableLogForwarding() - .EnableLogMetrics() .SetLogForwardingMaxSamplesStored(12) .EnableDistributedTrace() .SetLogLevel("debug"); diff --git a/tests/Agent/IntegrationTests/IntegrationTests/Logging/MetricsAndForwardingTests.cs b/tests/Agent/IntegrationTests/IntegrationTests/Logging/MetricsAndForwardingTests.cs index 6bd537287b..8cd9b4a880 100644 --- a/tests/Agent/IntegrationTests/IntegrationTests/Logging/MetricsAndForwardingTests.cs +++ b/tests/Agent/IntegrationTests/IntegrationTests/Logging/MetricsAndForwardingTests.cs @@ -134,7 +134,7 @@ public MetricsAndForwardingTestsBase(TFixture fixture, ITestOutputHelper output, { var configModifier = new NewRelicConfigModifier(fixture.DestinationNewRelicConfigFilePath); - configModifier.EnableApplicationLogging() + configModifier .EnableLogMetrics(metricsEnabled) .EnableLogForwarding(forwardingEnabled) .EnableDistributedTrace() diff --git a/tests/Agent/IntegrationTests/IntegrationTests/Logging/ZeroMaxSamplesStoredTests.cs b/tests/Agent/IntegrationTests/IntegrationTests/Logging/ZeroMaxSamplesStoredTests.cs index 425a2aa067..2d8e913fff 100644 --- a/tests/Agent/IntegrationTests/IntegrationTests/Logging/ZeroMaxSamplesStoredTests.cs +++ b/tests/Agent/IntegrationTests/IntegrationTests/Logging/ZeroMaxSamplesStoredTests.cs @@ -34,10 +34,8 @@ public ZeroMaxSamplesStoredTestsBase(TFixture fixture, ITestOutputHelper output, { var configModifier = new NewRelicConfigModifier(fixture.DestinationNewRelicConfigFilePath); + // applicationLogging metrics and forwarding enabled by default configModifier - .EnableApplicationLogging() - .EnableLogForwarding() - .EnableLogMetrics() .SetLogForwardingMaxSamplesStored(1) // must be 1 since 0 causes it to return the default .EnableDistributedTrace() .SetLogLevel("debug"); diff --git a/tests/Agent/UnitTests/Core.UnitTest/Configuration/DefaultConfigurationTests.cs b/tests/Agent/UnitTests/Core.UnitTest/Configuration/DefaultConfigurationTests.cs index 9059f1e780..f217ae72aa 100644 --- a/tests/Agent/UnitTests/Core.UnitTest/Configuration/DefaultConfigurationTests.cs +++ b/tests/Agent/UnitTests/Core.UnitTest/Configuration/DefaultConfigurationTests.cs @@ -2643,9 +2643,9 @@ public void ApplicationLogging_Enabled_OverridesIndividualLoggingFeatures(bool a } [Test] - public void ApplicationLogging_ForwardingEnabled_IsFalseInLocalConfigByDefault() + public void ApplicationLogging_ForwardingEnabled_IsTrueInLocalConfigByDefault() { - Assert.IsFalse(_defaultConfig.LogEventCollectorEnabled); + Assert.IsTrue(_defaultConfig.LogEventCollectorEnabled); } [Test]