Skip to content

Commit cb74eb8

Browse files
Add missing ILogger<T> updates (Azure#22376)
1 parent 6598f9f commit cb74eb8

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/src/Config/EventHubExtensionConfigProvider.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using Azure.Messaging.EventHubs;
88
using Azure.Messaging.EventHubs.Producer;
99
using Microsoft.Azure.WebJobs.Description;
10+
using Microsoft.Azure.WebJobs.EventHubs.Listeners;
1011
using Microsoft.Azure.WebJobs.EventHubs.Processor;
1112
using Microsoft.Azure.WebJobs.Host.Bindings;
1213
using Microsoft.Azure.WebJobs.Host.Config;
@@ -88,7 +89,7 @@ public void Initialize(ExtensionConfigContext context)
8889

8990
internal static void LogExceptionReceivedEvent(ExceptionReceivedEventArgs e, ILoggerFactory loggerFactory)
9091
{
91-
var logger = loggerFactory?.CreateLogger(LogCategories.Executor);
92+
var logger = loggerFactory?.CreateLogger<EventHubListener>();
9293
string message = $"EventProcessorHost error (Action='{e.Action}', HostName='{e.Hostname}', PartitionId='{e.PartitionId}').";
9394

9495
Utility.LogException(e.Exception, message, logger);

sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/src/Listeners/EventHubListener.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,21 @@
33

44
using System;
55
using System.Collections.Generic;
6-
using System.Diagnostics;
76
using System.Globalization;
87
using System.IO;
98
using System.Linq;
109
using System.Threading;
1110
using System.Threading.Tasks;
1211
using Azure.Messaging.EventHubs;
1312
using Azure.Messaging.EventHubs.Processor;
14-
using Microsoft.Azure.WebJobs.EventHubs.Listeners;
1513
using Microsoft.Azure.WebJobs.EventHubs.Processor;
1614
using Microsoft.Azure.WebJobs.Host.Executors;
1715
using Microsoft.Azure.WebJobs.Host.Listeners;
1816
using Microsoft.Azure.WebJobs.Host.Scale;
1917
using Microsoft.Extensions.Logging;
2018
using Newtonsoft.Json;
2119

22-
namespace Microsoft.Azure.WebJobs.EventHubs
20+
namespace Microsoft.Azure.WebJobs.EventHubs.Listeners
2321
{
2422
internal sealed class EventHubListener : IListener, IEventProcessorFactory, IScaleMonitorProvider
2523
{

sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/src/Triggers/EventHubTriggerAttributeBindingProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using System.Threading.Tasks;
77
using Azure.Messaging.EventHubs.Core;
88
using Azure.Messaging.EventHubs.Processor;
9-
using Azure.Storage.Blobs;
9+
using Microsoft.Azure.WebJobs.EventHubs.Listeners;
1010
using Microsoft.Azure.WebJobs.Host.Bindings;
1111
using Microsoft.Azure.WebJobs.Host.Listeners;
1212
using Microsoft.Azure.WebJobs.Host.Triggers;

sdk/servicebus/Microsoft.Azure.WebJobs.Extensions.ServiceBus/src/Config/ServiceBusExtensionConfigProvider.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@
1010
using Microsoft.Azure.WebJobs.Host.Config;
1111
using Microsoft.Azure.WebJobs.Logging;
1212
using Microsoft.Azure.WebJobs.ServiceBus.Bindings;
13+
using Microsoft.Azure.WebJobs.ServiceBus.Listeners;
1314
using Microsoft.Azure.WebJobs.ServiceBus.Triggers;
14-
using Microsoft.Extensions.Azure;
15-
using Microsoft.Extensions.Configuration;
1615
using Microsoft.Extensions.Logging;
1716
using Microsoft.Extensions.Logging.Abstractions;
1817
using Microsoft.Extensions.Options;
@@ -99,7 +98,7 @@ internal static void LogExceptionReceivedEvent(ProcessErrorEventArgs e, ILoggerF
9998
try
10099
{
101100
var errorSource = e.ErrorSource;
102-
var logger = loggerFactory?.CreateLogger(LogCategories.Executor);
101+
var logger = loggerFactory?.CreateLogger<ServiceBusListener>();
103102
//TODO new SDK does not expose client ID in event args or on clients
104103
string message = $"Message processing error (Action={errorSource}, EntityPath={e.EntityPath}, Endpoint={e.FullyQualifiedNamespace})";
105104

0 commit comments

Comments
 (0)