Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@ public static class ScriptLoggingBuilderExtensions
// suppressed to reduce noise in the FunctionsLogs table.
private static readonly HashSet<string> _suppressedCategories = new(StringComparer.Ordinal)
{
"Host.Triggers.Kafka",
Comment thread
RohitRanjanMS marked this conversation as resolved.
Outdated
"Microsoft.Azure.WebJobs.EventHubs.Listeners.EventHubListener.PartitionProcessor",
Comment thread
RohitRanjanMS marked this conversation as resolved.
Outdated
"Microsoft.Azure.WebJobs.Extensions.Storage.Common.Listeners.QueueListener",
"Microsoft.Azure.WebJobs.Extensions.Storage.Blobs.Listeners.BlobListener",
Comment thread
RohitRanjanMS marked this conversation as resolved.
Outdated
"Microsoft.Azure.WebJobs.EventHubs.EventHubProducerClientImpl",
"Microsoft.Azure.WebJobs.Host.Queues.Listeners.QueueListener",
Comment thread
RohitRanjanMS marked this conversation as resolved.
Outdated
Comment thread
RohitRanjanMS marked this conversation as resolved.
Outdated
"Host.Executor"
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@ public void Filter_RespectsMinLevelAndCategory(string category, LogLevel actualL
[InlineData("Microsoft.Azure.WebJobs.EventHubs.EventHubProducerClientImpl", LogLevel.Trace)]
[InlineData("Host.Executor", LogLevel.Debug)]
[InlineData("Host.Executor", LogLevel.Trace)]
[InlineData("Microsoft.Azure.WebJobs.EventHubs.Listeners.EventHubListener.PartitionProcessor", LogLevel.Debug)]
[InlineData("Microsoft.Azure.WebJobs.EventHubs.Listeners.EventHubListener.PartitionProcessor", LogLevel.Trace)]
[InlineData("Microsoft.Azure.WebJobs.Extensions.Storage.Blobs.Listeners.BlobListener", LogLevel.Debug)]
[InlineData("Microsoft.Azure.WebJobs.Extensions.Storage.Blobs.Listeners.BlobListener", LogLevel.Trace)]
[InlineData("Host.Triggers.Kafka", LogLevel.Debug)]
[InlineData("Host.Triggers.Kafka", LogLevel.Trace)]
[InlineData("Microsoft.Azure.WebJobs.Host.Queues.Listeners.QueueListener", LogLevel.Debug)]
[InlineData("Microsoft.Azure.WebJobs.Host.Queues.Listeners.QueueListener", LogLevel.Trace)]
public void Filter_SuppressedCategory_DebugAndTrace_ReturnsFalse(string category, LogLevel level)
{
Assert.False(ScriptLoggingBuilderExtensions.Filter(category, level, LogLevel.Trace));
Expand All @@ -74,6 +82,14 @@ public void Filter_SuppressedCategory_DebugAndTrace_ReturnsFalse(string category
[InlineData("Microsoft.Azure.WebJobs.EventHubs.EventHubProducerClientImpl", LogLevel.Error)]
[InlineData("Host.Executor", LogLevel.Information)]
[InlineData("Host.Executor", LogLevel.Critical)]
[InlineData("Microsoft.Azure.WebJobs.EventHubs.Listeners.EventHubListener.PartitionProcessor", LogLevel.Information)]
[InlineData("Microsoft.Azure.WebJobs.EventHubs.Listeners.EventHubListener.PartitionProcessor", LogLevel.Warning)]
[InlineData("Microsoft.Azure.WebJobs.Extensions.Storage.Blobs.Listeners.BlobListener", LogLevel.Information)]
[InlineData("Microsoft.Azure.WebJobs.Extensions.Storage.Blobs.Listeners.BlobListener", LogLevel.Error)]
[InlineData("Host.Triggers.Kafka", LogLevel.Information)]
[InlineData("Host.Triggers.Kafka", LogLevel.Critical)]
[InlineData("Microsoft.Azure.WebJobs.Host.Queues.Listeners.QueueListener", LogLevel.Information)]
[InlineData("Microsoft.Azure.WebJobs.Host.Queues.Listeners.QueueListener", LogLevel.Warning)]
public void Filter_SuppressedCategory_InformationAndAbove_ReturnsTrue(string category, LogLevel level)
{
Assert.True(ScriptLoggingBuilderExtensions.Filter(category, level, LogLevel.Trace));
Expand Down
Loading