| | | 1 | | // Copyright (c) Microsoft. All rights reserved. |
| | | 2 | | // Licensed under the MIT license. See LICENSE file in the project root for full license information. |
| | | 3 | | |
| | | 4 | | namespace Microsoft.Azure.ServiceBus |
| | | 5 | | { |
| | | 6 | | using System; |
| | | 7 | | using System.Collections.Generic; |
| | | 8 | | using System.Diagnostics.Tracing; |
| | | 9 | | using System.Reflection; |
| | | 10 | | using System.Text; |
| | | 11 | | using System.Threading.Tasks; |
| | | 12 | | using Microsoft.Azure.Amqp; |
| | | 13 | | using Microsoft.Azure.ServiceBus.Amqp; |
| | | 14 | | using Microsoft.Azure.ServiceBus.Primitives; |
| | | 15 | | |
| | | 16 | | [EventSource(Name = "Microsoft-Azure-ServiceBus")] |
| | | 17 | | internal sealed class MessagingEventSource : EventSource |
| | | 18 | | { |
| | | 19 | | public static MessagingEventSource Log { get; } = new MessagingEventSource(); |
| | | 20 | | |
| | | 21 | | [Event(1, Level = EventLevel.Informational, Message = "Creating QueueClient (Namespace '{0}'; Queue '{1}'; Recei |
| | | 22 | | public void QueueClientCreateStart(string namespaceName, string queueName, string receiveMode) |
| | | 23 | | { |
| | | 24 | | if (this.IsEnabled()) |
| | | 25 | | { |
| | | 26 | | this.WriteEvent(1, namespaceName ?? string.Empty, queueName, receiveMode); |
| | | 27 | | } |
| | | 28 | | } |
| | | 29 | | |
| | | 30 | | [Event(2, Level = EventLevel.Informational, Message = "QueueClient (Namespace '{0}'; Queue '{1}'; ClientId: '{2} |
| | | 31 | | public void QueueClientCreateStop(string namespaceName, string queueName, string clientId) |
| | | 32 | | { |
| | | 33 | | if (this.IsEnabled()) |
| | | 34 | | { |
| | | 35 | | this.WriteEvent(2, namespaceName, queueName, clientId); |
| | | 36 | | } |
| | | 37 | | } |
| | | 38 | | |
| | | 39 | | [Event(3, Level = EventLevel.Informational, Message = "Creating TopicClient (Namespace '{0}'; Topic '{1}').")] |
| | | 40 | | public void TopicClientCreateStart(string namespaceName, string topicName) |
| | | 41 | | { |
| | | 42 | | if (this.IsEnabled()) |
| | | 43 | | { |
| | | 44 | | this.WriteEvent(3, namespaceName ?? string.Empty, topicName); |
| | | 45 | | } |
| | | 46 | | } |
| | | 47 | | |
| | | 48 | | [Event(4, Level = EventLevel.Informational, Message = "TopicClient (Namespace '{0}'; Topic '{1}'; ClientId: '{2} |
| | | 49 | | public void TopicClientCreateStop(string namespaceName, string topicName, string clientId) |
| | | 50 | | { |
| | | 51 | | if (this.IsEnabled()) |
| | | 52 | | { |
| | | 53 | | this.WriteEvent(4, namespaceName, topicName, clientId); |
| | | 54 | | } |
| | | 55 | | } |
| | | 56 | | |
| | | 57 | | [Event(5, Level = EventLevel.Informational, Message = "Creating SubscriptionClient (Namespace '{0}'; Topic '{1}' |
| | | 58 | | public void SubscriptionClientCreateStart(string namespaceName, string topicName, string subscriptionName, strin |
| | | 59 | | { |
| | | 60 | | if (this.IsEnabled()) |
| | | 61 | | { |
| | | 62 | | this.WriteEvent(5, namespaceName, topicName ?? string.Empty, subscriptionName, receiveMode); |
| | | 63 | | } |
| | | 64 | | } |
| | | 65 | | |
| | | 66 | | [Event(6, Level = EventLevel.Informational, Message = "SubscriptionClient (Namespace '{0}'; Topic '{1}'; Subscri |
| | | 67 | | public void SubscriptionClientCreateStop(string namespaceName, string topicName, string subscriptionName, string |
| | | 68 | | { |
| | | 69 | | if (this.IsEnabled()) |
| | | 70 | | { |
| | | 71 | | this.WriteEvent(6, namespaceName, topicName, subscriptionName, clientId); |
| | | 72 | | } |
| | | 73 | | } |
| | | 74 | | |
| | | 75 | | [Event(7, Level = EventLevel.Informational, Message = "{0}: SendAsync start. MessageCount = {1}")] |
| | | 76 | | public void MessageSendStart(string clientId, int messageCount) |
| | | 77 | | { |
| | | 78 | | if (this.IsEnabled()) |
| | | 79 | | { |
| | | 80 | | this.WriteEvent(7, clientId, messageCount); |
| | | 81 | | } |
| | | 82 | | } |
| | | 83 | | |
| | | 84 | | [Event(8, Level = EventLevel.Informational, Message = "{0}: SendAsync done.")] |
| | | 85 | | public void MessageSendStop(string clientId) |
| | | 86 | | { |
| | | 87 | | if (this.IsEnabled()) |
| | | 88 | | { |
| | | 89 | | this.WriteEvent(8, clientId); |
| | | 90 | | } |
| | | 91 | | } |
| | | 92 | | |
| | | 93 | | [NonEvent] |
| | | 94 | | public void MessageSendException(string clientId, Exception exception) |
| | | 95 | | { |
| | | 96 | | if (this.IsEnabled()) |
| | | 97 | | { |
| | | 98 | | this.MessageSendException(clientId, exception.ToString()); |
| | | 99 | | } |
| | | 100 | | } |
| | | 101 | | |
| | | 102 | | [Event(9, Level = EventLevel.Error, Message = "{0}: SendAsync Exception: {1}.")] |
| | | 103 | | void MessageSendException(string clientId, string exception) |
| | | 104 | | { |
| | | 105 | | this.WriteEvent(9, clientId, exception); |
| | | 106 | | } |
| | | 107 | | |
| | | 108 | | [Event(10, Level = EventLevel.Informational, Message = "{0}: ReceiveAsync start. MessageCount = {1}")] |
| | | 109 | | public void MessageReceiveStart(string clientId, int messageCount) |
| | | 110 | | { |
| | | 111 | | if (this.IsEnabled()) |
| | | 112 | | { |
| | | 113 | | this.WriteEvent(10, clientId, messageCount); |
| | | 114 | | } |
| | | 115 | | } |
| | | 116 | | |
| | | 117 | | [Event(11, Level = EventLevel.Informational, Message = "{0}: ReceiveAsync done. Received '{1}' messages")] |
| | | 118 | | public void MessageReceiveStop(string clientId, int messageCount) |
| | | 119 | | { |
| | | 120 | | if (this.IsEnabled()) |
| | | 121 | | { |
| | | 122 | | this.WriteEvent(11, clientId, messageCount); |
| | | 123 | | } |
| | | 124 | | } |
| | | 125 | | |
| | | 126 | | [NonEvent] |
| | | 127 | | public void MessageReceiveException(string clientId, Exception exception) |
| | | 128 | | { |
| | | 129 | | if (this.IsEnabled()) |
| | | 130 | | { |
| | | 131 | | this.MessageReceiveException(clientId, exception.ToString()); |
| | | 132 | | } |
| | | 133 | | } |
| | | 134 | | |
| | | 135 | | [Event(12, Level = EventLevel.Error, Message = "{0}: ReceiveAsync Exception: {1}.")] |
| | | 136 | | void MessageReceiveException(string clientId, string exception) |
| | | 137 | | { |
| | | 138 | | this.WriteEvent(12, clientId, exception); |
| | | 139 | | } |
| | | 140 | | |
| | | 141 | | [NonEvent] |
| | | 142 | | public void MessageCompleteStart(string clientId, int messageCount, IEnumerable<string> lockTokens) |
| | | 143 | | { |
| | | 144 | | if (this.IsEnabled()) |
| | | 145 | | { |
| | | 146 | | var formattedLockTokens = StringUtility.GetFormattedLockTokens(lockTokens); |
| | | 147 | | this.MessageCompleteStart(clientId, messageCount, formattedLockTokens); |
| | | 148 | | } |
| | | 149 | | } |
| | | 150 | | |
| | | 151 | | [Event(13, Level = EventLevel.Informational, Message = "{0}: CompleteAsync start. MessageCount = {1}, LockTokens |
| | | 152 | | void MessageCompleteStart(string clientId, int messageCount, string lockTokens) |
| | | 153 | | { |
| | | 154 | | this.WriteEvent(13, clientId, messageCount, lockTokens); |
| | | 155 | | } |
| | | 156 | | |
| | | 157 | | [Event(14, Level = EventLevel.Informational, Message = "{0}: CompleteAsync done.")] |
| | | 158 | | public void MessageCompleteStop(string clientId) |
| | | 159 | | { |
| | | 160 | | if (this.IsEnabled()) |
| | | 161 | | { |
| | | 162 | | this.WriteEvent(14, clientId); |
| | | 163 | | } |
| | | 164 | | } |
| | | 165 | | |
| | | 166 | | [NonEvent] |
| | | 167 | | public void MessageCompleteException(string clientId, Exception exception) |
| | | 168 | | { |
| | | 169 | | if (this.IsEnabled()) |
| | | 170 | | { |
| | | 171 | | this.MessageCompleteException(clientId, exception.ToString()); |
| | | 172 | | } |
| | | 173 | | } |
| | | 174 | | |
| | | 175 | | [Event(15, Level = EventLevel.Error, Message = "{0}: CompleteAsync Exception: {1}.")] |
| | | 176 | | void MessageCompleteException(string clientId, string exception) |
| | | 177 | | { |
| | | 178 | | this.WriteEvent(15, clientId, exception); |
| | | 179 | | } |
| | | 180 | | |
| | | 181 | | [Event(16, Level = EventLevel.Informational, Message = "{0}: AbandonAsync start. MessageCount = {1}, LockToken = |
| | | 182 | | public void MessageAbandonStart(string clientId, int messageCount, string lockToken) |
| | | 183 | | { |
| | | 184 | | if (this.IsEnabled()) |
| | | 185 | | { |
| | | 186 | | this.WriteEvent(16, clientId, messageCount, lockToken); |
| | | 187 | | } |
| | | 188 | | } |
| | | 189 | | |
| | | 190 | | [Event(17, Level = EventLevel.Informational, Message = "{0}: AbandonAsync done.")] |
| | | 191 | | public void MessageAbandonStop(string clientId) |
| | | 192 | | { |
| | | 193 | | if (this.IsEnabled()) |
| | | 194 | | { |
| | | 195 | | this.WriteEvent(17, clientId); |
| | | 196 | | } |
| | | 197 | | } |
| | | 198 | | |
| | | 199 | | [NonEvent] |
| | | 200 | | public void MessageAbandonException(string clientId, Exception exception) |
| | | 201 | | { |
| | | 202 | | if (this.IsEnabled()) |
| | | 203 | | { |
| | | 204 | | this.MessageAbandonException(clientId, exception.ToString()); |
| | | 205 | | } |
| | | 206 | | } |
| | | 207 | | |
| | | 208 | | [Event(18, Level = EventLevel.Error, Message = "{0}: AbandonAsync Exception: {1}.")] |
| | | 209 | | void MessageAbandonException(string clientId, string exception) |
| | | 210 | | { |
| | | 211 | | this.WriteEvent(18, clientId, exception); |
| | | 212 | | } |
| | | 213 | | |
| | | 214 | | [Event(19, Level = EventLevel.Informational, Message = "{0}: DeferAsync start. MessageCount = {1}, LockToken = { |
| | | 215 | | public void MessageDeferStart(string clientId, int messageCount, string lockToken) |
| | | 216 | | { |
| | | 217 | | if (this.IsEnabled()) |
| | | 218 | | { |
| | | 219 | | this.WriteEvent(19, clientId, messageCount, lockToken); |
| | | 220 | | } |
| | | 221 | | } |
| | | 222 | | |
| | | 223 | | [Event(20, Level = EventLevel.Informational, Message = "{0}: DeferAsync done.")] |
| | | 224 | | public void MessageDeferStop(string clientId) |
| | | 225 | | { |
| | | 226 | | if (this.IsEnabled()) |
| | | 227 | | { |
| | | 228 | | this.WriteEvent(20, clientId); |
| | | 229 | | } |
| | | 230 | | } |
| | | 231 | | |
| | | 232 | | [NonEvent] |
| | | 233 | | public void MessageDeferException(string clientId, Exception exception) |
| | | 234 | | { |
| | | 235 | | if (this.IsEnabled()) |
| | | 236 | | { |
| | | 237 | | this.MessageDeferException(clientId, exception.ToString()); |
| | | 238 | | } |
| | | 239 | | } |
| | | 240 | | |
| | | 241 | | [Event(21, Level = EventLevel.Error, Message = "{0}: DeferAsync Exception: {1}.")] |
| | | 242 | | void MessageDeferException(string clientId, string exception) |
| | | 243 | | { |
| | | 244 | | this.WriteEvent(21, clientId, exception); |
| | | 245 | | } |
| | | 246 | | |
| | | 247 | | [Event(22, Level = EventLevel.Informational, Message = "{0}: DeadLetterAsync start. MessageCount = {1}, LockToke |
| | | 248 | | public void MessageDeadLetterStart(string clientId, int messageCount, string lockToken) |
| | | 249 | | { |
| | | 250 | | if (this.IsEnabled()) |
| | | 251 | | { |
| | | 252 | | this.WriteEvent(22, clientId, messageCount, lockToken); |
| | | 253 | | } |
| | | 254 | | } |
| | | 255 | | |
| | | 256 | | [Event(23, Level = EventLevel.Informational, Message = "{0}: DeadLetterAsync done.")] |
| | | 257 | | public void MessageDeadLetterStop(string clientId) |
| | | 258 | | { |
| | | 259 | | if (this.IsEnabled()) |
| | | 260 | | { |
| | | 261 | | this.WriteEvent(23, clientId); |
| | | 262 | | } |
| | | 263 | | } |
| | | 264 | | |
| | | 265 | | [NonEvent] |
| | | 266 | | public void MessageDeadLetterException(string clientId, Exception exception) |
| | | 267 | | { |
| | | 268 | | if (this.IsEnabled()) |
| | | 269 | | { |
| | | 270 | | this.MessageDeadLetterException(clientId, exception.ToString()); |
| | | 271 | | } |
| | | 272 | | } |
| | | 273 | | |
| | | 274 | | [Event(24, Level = EventLevel.Error, Message = "{0}: DeadLetterAsync Exception: {1}.")] |
| | | 275 | | void MessageDeadLetterException(string clientId, string exception) |
| | | 276 | | { |
| | | 277 | | this.WriteEvent(24, clientId, exception); |
| | | 278 | | } |
| | | 279 | | |
| | | 280 | | [Event(25, Level = EventLevel.Informational, Message = "{0}: RenewLockAsync start. MessageCount = {1}, LockToken |
| | | 281 | | public void MessageRenewLockStart(string clientId, int messageCount, string lockToken) |
| | | 282 | | { |
| | | 283 | | if (this.IsEnabled()) |
| | | 284 | | { |
| | | 285 | | this.WriteEvent(25, clientId, messageCount, lockToken); |
| | | 286 | | } |
| | | 287 | | } |
| | | 288 | | |
| | | 289 | | [Event(26, Level = EventLevel.Informational, Message = "{0}: RenewLockAsync done.")] |
| | | 290 | | public void MessageRenewLockStop(string clientId) |
| | | 291 | | { |
| | | 292 | | if (this.IsEnabled()) |
| | | 293 | | { |
| | | 294 | | this.WriteEvent(26, clientId); |
| | | 295 | | } |
| | | 296 | | } |
| | | 297 | | |
| | | 298 | | [NonEvent] |
| | | 299 | | public void MessageRenewLockException(string clientId, Exception exception) |
| | | 300 | | { |
| | | 301 | | if (this.IsEnabled()) |
| | | 302 | | { |
| | | 303 | | this.MessageRenewLockException(clientId, exception.ToString()); |
| | | 304 | | } |
| | | 305 | | } |
| | | 306 | | |
| | | 307 | | [Event(27, Level = EventLevel.Error, Message = "{0}: RenewLockAsync Exception: {1}.")] |
| | | 308 | | void MessageRenewLockException(string clientId, string exception) |
| | | 309 | | { |
| | | 310 | | this.WriteEvent(27, clientId, exception); |
| | | 311 | | } |
| | | 312 | | |
| | | 313 | | [NonEvent] |
| | | 314 | | public void MessageReceiveDeferredMessageStart(string clientId, int messageCount, IEnumerable<long> sequenceNumb |
| | | 315 | | { |
| | | 316 | | if (this.IsEnabled()) |
| | | 317 | | { |
| | | 318 | | var formattedSequenceNumbers = StringUtility.GetFormattedSequenceNumbers(sequenceNumbers); |
| | | 319 | | this.MessageReceiveDeferredMessageStart(clientId, messageCount, formattedSequenceNumbers); |
| | | 320 | | } |
| | | 321 | | } |
| | | 322 | | |
| | | 323 | | [Event(28, Level = EventLevel.Informational, Message = "{0}: ReceiveDeferredMessageAsync start. MessageCount = { |
| | | 324 | | void MessageReceiveDeferredMessageStart(string clientId, int messageCount, string sequenceNumbers) |
| | | 325 | | { |
| | | 326 | | this.WriteEvent(28, clientId, messageCount, sequenceNumbers); |
| | | 327 | | } |
| | | 328 | | |
| | | 329 | | [Event(29, Level = EventLevel.Informational, Message = "{0}: ReceiveDeferredMessageAsync done. Received '{1}' me |
| | | 330 | | public void MessageReceiveDeferredMessageStop(string clientId, int messageCount) |
| | | 331 | | { |
| | | 332 | | if (this.IsEnabled()) |
| | | 333 | | { |
| | | 334 | | this.WriteEvent(29, clientId, messageCount); |
| | | 335 | | } |
| | | 336 | | } |
| | | 337 | | |
| | | 338 | | [NonEvent] |
| | | 339 | | public void MessageReceiveDeferredMessageException(string clientId, Exception exception) |
| | | 340 | | { |
| | | 341 | | if (this.IsEnabled()) |
| | | 342 | | { |
| | | 343 | | this.MessageReceiveDeferredMessageException(clientId, exception.ToString()); |
| | | 344 | | } |
| | | 345 | | } |
| | | 346 | | |
| | | 347 | | [Event(30, Level = EventLevel.Error, Message = "{0}: ReceiveDeferredMessageAsync Exception: {1}.")] |
| | | 348 | | void MessageReceiveDeferredMessageException(string clientId, string exception) |
| | | 349 | | { |
| | | 350 | | this.WriteEvent(30, clientId, exception); |
| | | 351 | | } |
| | | 352 | | |
| | | 353 | | // Unused - 31;32;33 |
| | | 354 | | |
| | | 355 | | [NonEvent] |
| | | 356 | | public void AmqpSendLinkCreateStart(string clientId, MessagingEntityType? entityType, string entityPath) |
| | | 357 | | { |
| | | 358 | | if (this.IsEnabled()) |
| | | 359 | | { |
| | | 360 | | this.AmqpSendLinkCreateStart(clientId, entityType?.ToString() ?? string.Empty, entityPath); |
| | | 361 | | } |
| | | 362 | | } |
| | | 363 | | |
| | | 364 | | [Event(34, Level = EventLevel.Informational, Message = "{0}: AmqpSendLinkCreate started. EntityType: {1}, Entity |
| | | 365 | | void AmqpSendLinkCreateStart(string clientId, string entityType, string entityPath) |
| | | 366 | | { |
| | | 367 | | this.WriteEvent(34, clientId, entityType, entityPath); |
| | | 368 | | } |
| | | 369 | | |
| | | 370 | | [Event(35, Level = EventLevel.Informational, Message = "{0}: AmqpSendLinkCreate done.")] |
| | | 371 | | public void AmqpSendLinkCreateStop(string clientId) |
| | | 372 | | { |
| | | 373 | | if (this.IsEnabled()) |
| | | 374 | | { |
| | | 375 | | this.WriteEvent(35, clientId); |
| | | 376 | | } |
| | | 377 | | } |
| | | 378 | | |
| | | 379 | | [NonEvent] |
| | | 380 | | public void AmqpReceiveLinkCreateStart(string clientId, bool isRequestResponseLink, MessagingEntityType? entityT |
| | | 381 | | { |
| | | 382 | | if (this.IsEnabled()) |
| | | 383 | | { |
| | | 384 | | this.AmqpReceiveLinkCreateStart(clientId, isRequestResponseLink.ToString(), entityType?.ToString() ?? st |
| | | 385 | | } |
| | | 386 | | } |
| | | 387 | | |
| | | 388 | | [Event(36, Level = EventLevel.Informational, Message = "{0}: AmqpReceiveLinkCreate started. IsRequestResponseLin |
| | | 389 | | void AmqpReceiveLinkCreateStart(string clientId, string isRequestResponseLink, string entityType, string entityP |
| | | 390 | | { |
| | | 391 | | this.WriteEvent(36, clientId, isRequestResponseLink, entityType, entityPath); |
| | | 392 | | } |
| | | 393 | | |
| | | 394 | | [Event(37, Level = EventLevel.Informational, Message = "{0}: AmqpReceiveLinkCreate done.")] |
| | | 395 | | public void AmqpReceiveLinkCreateStop(string clientId) |
| | | 396 | | { |
| | | 397 | | if (this.IsEnabled()) |
| | | 398 | | { |
| | | 399 | | this.WriteEvent(37, clientId); |
| | | 400 | | } |
| | | 401 | | } |
| | | 402 | | |
| | | 403 | | [Event(38, Level = EventLevel.Verbose, Message = "AmqpGetOrCreateConnection started.")] |
| | | 404 | | public void AmqpGetOrCreateConnectionStart() |
| | | 405 | | { |
| | | 406 | | if (this.IsEnabled()) |
| | | 407 | | { |
| | | 408 | | this.WriteEvent(38); |
| | | 409 | | } |
| | | 410 | | } |
| | | 411 | | |
| | | 412 | | [Event(39, Level = EventLevel.Verbose, Message = "AmqpGetOrCreateConnection done. EntityPath: {0}, ConnectionInf |
| | | 413 | | public void AmqpGetOrCreateConnectionStop(string entityPath, string connectionInfo, string connectionState) |
| | | 414 | | { |
| | | 415 | | if (this.IsEnabled()) |
| | | 416 | | { |
| | | 417 | | this.WriteEvent(39, entityPath, connectionInfo, connectionState); |
| | | 418 | | } |
| | | 419 | | } |
| | | 420 | | |
| | | 421 | | [NonEvent] |
| | | 422 | | public void AmqpSendAuthenticationTokenStart(Uri address, string audience, string resource, string[] claims) |
| | | 423 | | { |
| | | 424 | | if (this.IsEnabled()) |
| | | 425 | | { |
| | | 426 | | this.AmqpSendAuthenticationTokenStart(address.ToString(), audience, resource, claims.ToString()); |
| | | 427 | | } |
| | | 428 | | } |
| | | 429 | | |
| | | 430 | | [Event(40, Level = EventLevel.Verbose, Message = "AmqpSendAuthenticanToken started. Address: {0}, Audience: {1}, |
| | | 431 | | void AmqpSendAuthenticationTokenStart(string address, string audience, string resource, string claims) |
| | | 432 | | { |
| | | 433 | | this.WriteEvent(40, address, audience, resource, claims); |
| | | 434 | | } |
| | | 435 | | |
| | | 436 | | [Event(41, Level = EventLevel.Verbose, Message = "AmqpSendAuthenticanToken done.")] |
| | | 437 | | public void AmqpSendAuthenticationTokenStop() |
| | | 438 | | { |
| | | 439 | | if (this.IsEnabled()) |
| | | 440 | | { |
| | | 441 | | this.WriteEvent(41); |
| | | 442 | | } |
| | | 443 | | } |
| | | 444 | | |
| | | 445 | | [Event(42, Level = EventLevel.Informational, Message = "{0}: MessagePeekAsync start. SequenceNumber = {1}, Messa |
| | | 446 | | public void MessagePeekStart(string clientId, long sequenceNumber, int messageCount) |
| | | 447 | | { |
| | | 448 | | if (this.IsEnabled()) |
| | | 449 | | { |
| | | 450 | | this.WriteEvent(42, clientId, sequenceNumber, messageCount); |
| | | 451 | | } |
| | | 452 | | } |
| | | 453 | | |
| | | 454 | | [Event(43, Level = EventLevel.Informational, Message = "{0}: MessagePeekAsync done. Peeked '{1}' messages")] |
| | | 455 | | public void MessagePeekStop(string clientId, int messageCount) |
| | | 456 | | { |
| | | 457 | | if (this.IsEnabled()) |
| | | 458 | | { |
| | | 459 | | this.WriteEvent(43, clientId, messageCount); |
| | | 460 | | } |
| | | 461 | | } |
| | | 462 | | |
| | | 463 | | [NonEvent] |
| | | 464 | | public void MessagePeekException(string clientId, Exception exception) |
| | | 465 | | { |
| | | 466 | | if (this.IsEnabled()) |
| | | 467 | | { |
| | | 468 | | this.MessagePeekException(clientId, exception.ToString()); |
| | | 469 | | } |
| | | 470 | | } |
| | | 471 | | |
| | | 472 | | [Event(44, Level = EventLevel.Error, Message = "{0}: MessagePeekAsync Exception: {1}.")] |
| | | 473 | | void MessagePeekException(string clientId, string exception) |
| | | 474 | | { |
| | | 475 | | this.WriteEvent(44, clientId, exception); |
| | | 476 | | } |
| | | 477 | | |
| | | 478 | | [Event(45, Level = EventLevel.Informational, Message = "Creating MessageSender (Namespace '{0}'; Entity '{1}')." |
| | | 479 | | public void MessageSenderCreateStart(string namespaceName, string entityName) |
| | | 480 | | { |
| | | 481 | | if (this.IsEnabled()) |
| | | 482 | | { |
| | | 483 | | this.WriteEvent(45, namespaceName, entityName); |
| | | 484 | | } |
| | | 485 | | } |
| | | 486 | | |
| | | 487 | | [Event(46, Level = EventLevel.Informational, Message = "MessageSender (Namespace '{0}'; Entity '{1}'; ClientId ' |
| | | 488 | | public void MessageSenderCreateStop(string namespaceName, string entityName, string clientId) |
| | | 489 | | { |
| | | 490 | | if (this.IsEnabled()) |
| | | 491 | | { |
| | | 492 | | this.WriteEvent(46, namespaceName, entityName, clientId); |
| | | 493 | | } |
| | | 494 | | } |
| | | 495 | | |
| | | 496 | | [Event(47, Level = EventLevel.Informational, Message = "Creating MessageReceiver (Namespace '{0}'; Entity '{1}'; |
| | | 497 | | public void MessageReceiverCreateStart(string namespaceName, string entityName, string receiveMode) |
| | | 498 | | { |
| | | 499 | | if (this.IsEnabled()) |
| | | 500 | | { |
| | | 501 | | this.WriteEvent(47, namespaceName, entityName, receiveMode); |
| | | 502 | | } |
| | | 503 | | } |
| | | 504 | | |
| | | 505 | | [Event(48, Level = EventLevel.Informational, Message = "MessageReceiver (Namespace '{0}'; Entity '{1}'; ClientId |
| | | 506 | | public void MessageReceiverCreateStop(string namespaceName, string entityName, string clientId) |
| | | 507 | | { |
| | | 508 | | if (this.IsEnabled()) |
| | | 509 | | { |
| | | 510 | | this.WriteEvent(48, namespaceName, entityName, clientId); |
| | | 511 | | } |
| | | 512 | | } |
| | | 513 | | |
| | | 514 | | [NonEvent] |
| | | 515 | | public void ScheduleMessageStart(string clientId, DateTimeOffset scheduleEnqueueTimeUtc) |
| | | 516 | | { |
| | | 517 | | if (this.IsEnabled()) |
| | | 518 | | { |
| | | 519 | | this.ScheduleMessageStart(clientId, scheduleEnqueueTimeUtc.ToString()); |
| | | 520 | | } |
| | | 521 | | } |
| | | 522 | | |
| | | 523 | | [Event(49, Level = EventLevel.Informational, Message = "{0}: ScheduleMessageAsync start. ScheduleTimeUtc = {1}") |
| | | 524 | | void ScheduleMessageStart(string clientId, string scheduleEnqueueTimeUtc) |
| | | 525 | | { |
| | | 526 | | if (this.IsEnabled()) |
| | | 527 | | { |
| | | 528 | | this.WriteEvent(49, clientId, scheduleEnqueueTimeUtc); |
| | | 529 | | } |
| | | 530 | | } |
| | | 531 | | |
| | | 532 | | [Event(50, Level = EventLevel.Informational, Message = "{0}: ScheduleMessageAsync done.")] |
| | | 533 | | public void ScheduleMessageStop(string clientId) |
| | | 534 | | { |
| | | 535 | | if (this.IsEnabled()) |
| | | 536 | | { |
| | | 537 | | this.WriteEvent(50, clientId); |
| | | 538 | | } |
| | | 539 | | } |
| | | 540 | | |
| | | 541 | | [NonEvent] |
| | | 542 | | public void ScheduleMessageException(string clientId, Exception exception) |
| | | 543 | | { |
| | | 544 | | if (this.IsEnabled()) |
| | | 545 | | { |
| | | 546 | | this.ScheduleMessageException(clientId, exception.ToString()); |
| | | 547 | | } |
| | | 548 | | } |
| | | 549 | | |
| | | 550 | | [Event(51, Level = EventLevel.Error, Message = "{0}: ScheduleMessageAsync Exception: {1}.")] |
| | | 551 | | void ScheduleMessageException(string clientId, string exception) |
| | | 552 | | { |
| | | 553 | | this.WriteEvent(51, clientId, exception); |
| | | 554 | | } |
| | | 555 | | |
| | | 556 | | [Event(52, Level = EventLevel.Informational, Message = "{0}: CancelScheduledMessageAsync start. SequenceNumber = |
| | | 557 | | public void CancelScheduledMessageStart(string clientId, long sequenceNumber) |
| | | 558 | | { |
| | | 559 | | if (this.IsEnabled()) |
| | | 560 | | { |
| | | 561 | | this.WriteEvent(52, clientId, sequenceNumber); |
| | | 562 | | } |
| | | 563 | | } |
| | | 564 | | |
| | | 565 | | [Event(53, Level = EventLevel.Informational, Message = "{0}: CancelScheduledMessageAsync done.")] |
| | | 566 | | public void CancelScheduledMessageStop(string clientId) |
| | | 567 | | { |
| | | 568 | | if (this.IsEnabled()) |
| | | 569 | | { |
| | | 570 | | this.WriteEvent(53, clientId); |
| | | 571 | | } |
| | | 572 | | } |
| | | 573 | | |
| | | 574 | | [NonEvent] |
| | | 575 | | public void CancelScheduledMessageException(string clientId, Exception exception) |
| | | 576 | | { |
| | | 577 | | if (this.IsEnabled()) |
| | | 578 | | { |
| | | 579 | | this.CancelScheduledMessageException(clientId, exception.ToString()); |
| | | 580 | | } |
| | | 581 | | } |
| | | 582 | | |
| | | 583 | | [Event(54, Level = EventLevel.Error, Message = "{0}: CancelScheduledMessageAsync Exception: {1}.")] |
| | | 584 | | void CancelScheduledMessageException(string clientId, string exception) |
| | | 585 | | { |
| | | 586 | | this.WriteEvent(54, clientId, exception); |
| | | 587 | | } |
| | | 588 | | |
| | | 589 | | [Event(55, Level = EventLevel.Informational, Message = "{0}: AddRuleAsync start. RuleName = {1}")] |
| | | 590 | | public void AddRuleStart(string clientId, string ruleName) |
| | | 591 | | { |
| | | 592 | | if (this.IsEnabled()) |
| | | 593 | | { |
| | | 594 | | this.WriteEvent(55, clientId, ruleName); |
| | | 595 | | } |
| | | 596 | | } |
| | | 597 | | |
| | | 598 | | [Event(56, Level = EventLevel.Informational, Message = "{0}: AddRuleAsync done.")] |
| | | 599 | | public void AddRuleStop(string clientId) |
| | | 600 | | { |
| | | 601 | | if (this.IsEnabled()) |
| | | 602 | | { |
| | | 603 | | this.WriteEvent(56, clientId); |
| | | 604 | | } |
| | | 605 | | } |
| | | 606 | | |
| | | 607 | | [NonEvent] |
| | | 608 | | public void AddRuleException(string clientId, Exception exception) |
| | | 609 | | { |
| | | 610 | | if (this.IsEnabled()) |
| | | 611 | | { |
| | | 612 | | this.AddRuleException(clientId, exception.ToString()); |
| | | 613 | | } |
| | | 614 | | } |
| | | 615 | | |
| | | 616 | | [Event(57, Level = EventLevel.Error, Message = "{0}: AddRuleAsync Exception: {1}.")] |
| | | 617 | | void AddRuleException(string clientId, string exception) |
| | | 618 | | { |
| | | 619 | | this.WriteEvent(57, clientId, exception); |
| | | 620 | | } |
| | | 621 | | |
| | | 622 | | [Event(58, Level = EventLevel.Informational, Message = "{0}: RemoveRuleAsync start. RuleName = {1}")] |
| | | 623 | | public void RemoveRuleStart(string clientId, string ruleName) |
| | | 624 | | { |
| | | 625 | | if (this.IsEnabled()) |
| | | 626 | | { |
| | | 627 | | this.WriteEvent(58, clientId, ruleName); |
| | | 628 | | } |
| | | 629 | | } |
| | | 630 | | |
| | | 631 | | [Event(59, Level = EventLevel.Informational, Message = "{0}: RemoveRuleAsync done.")] |
| | | 632 | | public void RemoveRuleStop(string clientId) |
| | | 633 | | { |
| | | 634 | | if (this.IsEnabled()) |
| | | 635 | | { |
| | | 636 | | this.WriteEvent(59, clientId); |
| | | 637 | | } |
| | | 638 | | } |
| | | 639 | | |
| | | 640 | | [NonEvent] |
| | | 641 | | public void RemoveRuleException(string clientId, Exception exception) |
| | | 642 | | { |
| | | 643 | | if (this.IsEnabled()) |
| | | 644 | | { |
| | | 645 | | this.RemoveRuleException(clientId, exception.ToString()); |
| | | 646 | | } |
| | | 647 | | } |
| | | 648 | | |
| | | 649 | | [Event(60, Level = EventLevel.Error, Message = "{0}: RemoveRuleAsync Exception: {1}.")] |
| | | 650 | | void RemoveRuleException(string clientId, string exception) |
| | | 651 | | { |
| | | 652 | | this.WriteEvent(60, clientId, exception); |
| | | 653 | | } |
| | | 654 | | |
| | | 655 | | [NonEvent] |
| | | 656 | | public void RegisterOnMessageHandlerStart(string clientId, MessageHandlerOptions registerHandlerOptions) |
| | | 657 | | { |
| | | 658 | | if (this.IsEnabled()) |
| | | 659 | | { |
| | | 660 | | this.RegisterOnMessageHandlerStart(clientId, registerHandlerOptions.AutoComplete, registerHandlerOptions |
| | | 661 | | } |
| | | 662 | | } |
| | | 663 | | |
| | | 664 | | [Event(61, Level = EventLevel.Informational, Message = "{0}: Register OnMessageHandler start: OnMessage Options: |
| | | 665 | | void RegisterOnMessageHandlerStart(string clientId, bool autoComplete, bool autorenewLock, int maxConcurrentCall |
| | | 666 | | { |
| | | 667 | | this.WriteEvent(61, clientId, autoComplete, autorenewLock, maxConcurrentCalls, autorenewTimeoutInSeconds); |
| | | 668 | | } |
| | | 669 | | |
| | | 670 | | [Event(62, Level = EventLevel.Informational, Message = "{0}: Register OnMessageHandler done.")] |
| | | 671 | | public void RegisterOnMessageHandlerStop(string clientId) |
| | | 672 | | { |
| | | 673 | | if (this.IsEnabled()) |
| | | 674 | | { |
| | | 675 | | this.WriteEvent(62, clientId); |
| | | 676 | | } |
| | | 677 | | } |
| | | 678 | | |
| | | 679 | | [NonEvent] |
| | | 680 | | public void RegisterOnMessageHandlerException(string clientId, Exception exception) |
| | | 681 | | { |
| | | 682 | | if (this.IsEnabled()) |
| | | 683 | | { |
| | | 684 | | this.RegisterOnMessageHandlerException(clientId, exception.ToString()); |
| | | 685 | | } |
| | | 686 | | } |
| | | 687 | | |
| | | 688 | | [Event(63, Level = EventLevel.Error, Message = "{0}: Register OnMessageHandler Exception: {1}")] |
| | | 689 | | void RegisterOnMessageHandlerException(string clientId, string exception) |
| | | 690 | | { |
| | | 691 | | this.WriteEvent(63, clientId, exception); |
| | | 692 | | } |
| | | 693 | | |
| | | 694 | | [NonEvent] |
| | | 695 | | public void MessageReceiverPumpTaskStart(string clientId, Message message, int currentSemaphoreCount) |
| | | 696 | | { |
| | | 697 | | if (this.IsEnabled()) |
| | | 698 | | { |
| | | 699 | | this.MessageReceiverPumpTaskStart(clientId, message?.SystemProperties.SequenceNumber ?? -1, currentSemap |
| | | 700 | | } |
| | | 701 | | } |
| | | 702 | | |
| | | 703 | | [Event(66, Level = EventLevel.Informational, Message = "{0}: MessageReceiverPump PumpTask Started: Message: Sequ |
| | | 704 | | void MessageReceiverPumpTaskStart(string clientId, long sequenceNumber, int currentSemaphoreCount) |
| | | 705 | | { |
| | | 706 | | this.WriteEvent(66, clientId, sequenceNumber, currentSemaphoreCount); |
| | | 707 | | } |
| | | 708 | | |
| | | 709 | | [Event(67, Level = EventLevel.Informational, Message = "{0}: MessageReceiverPump PumpTask done: Available Semaph |
| | | 710 | | public void MessageReceiverPumpTaskStop(string clientId, int currentSemaphoreCount) |
| | | 711 | | { |
| | | 712 | | if (this.IsEnabled()) |
| | | 713 | | { |
| | | 714 | | this.WriteEvent(67, clientId, currentSemaphoreCount); |
| | | 715 | | } |
| | | 716 | | } |
| | | 717 | | |
| | | 718 | | [NonEvent] |
| | | 719 | | public void MessageReceivePumpTaskException(string clientId, string sessionId, Exception exception) |
| | | 720 | | { |
| | | 721 | | if (this.IsEnabled()) |
| | | 722 | | { |
| | | 723 | | this.MessageReceivePumpTaskException(clientId, sessionId, exception.ToString()); |
| | | 724 | | } |
| | | 725 | | } |
| | | 726 | | |
| | | 727 | | [Event(68, Level = EventLevel.Error, Message = "{0}: MessageReceiverPump PumpTask Exception: SessionId: {1}, Exc |
| | | 728 | | void MessageReceivePumpTaskException(string clientId, string sessionId, string exception) |
| | | 729 | | { |
| | | 730 | | this.WriteEvent(68, clientId, sessionId, exception); |
| | | 731 | | } |
| | | 732 | | |
| | | 733 | | [NonEvent] |
| | | 734 | | public void MessageReceiverPumpDispatchTaskStart(string clientId, Message message) |
| | | 735 | | { |
| | | 736 | | if (this.IsEnabled()) |
| | | 737 | | { |
| | | 738 | | this.MessageReceiverPumpDispatchTaskStart(clientId, message?.SystemProperties.SequenceNumber ?? -1); |
| | | 739 | | } |
| | | 740 | | } |
| | | 741 | | |
| | | 742 | | [Event(69, Level = EventLevel.Informational, Message = "{0}: MessageReceiverPump DispatchTask start: Message: Se |
| | | 743 | | void MessageReceiverPumpDispatchTaskStart(string clientId, long sequenceNumber) |
| | | 744 | | { |
| | | 745 | | this.WriteEvent(69, clientId, sequenceNumber); |
| | | 746 | | } |
| | | 747 | | |
| | | 748 | | [NonEvent] |
| | | 749 | | public void MessageReceiverPumpDispatchTaskStop(string clientId, Message message, int currentSemaphoreCount) |
| | | 750 | | { |
| | | 751 | | if (this.IsEnabled()) |
| | | 752 | | { |
| | | 753 | | this.MessageReceiverPumpDispatchTaskStop(clientId, message?.SystemProperties.SequenceNumber ?? -1, curre |
| | | 754 | | } |
| | | 755 | | } |
| | | 756 | | |
| | | 757 | | [Event(70, Level = EventLevel.Informational, Message = "{0}: MessageReceiverPump DispatchTask done: Message: Seq |
| | | 758 | | void MessageReceiverPumpDispatchTaskStop(string clientId, long sequenceNumber, int currentSemaphoreCount) |
| | | 759 | | { |
| | | 760 | | this.WriteEvent(70, clientId, sequenceNumber, currentSemaphoreCount); |
| | | 761 | | } |
| | | 762 | | |
| | | 763 | | [NonEvent] |
| | | 764 | | public void MessageReceiverPumpUserCallbackStart(string clientId, Message message) |
| | | 765 | | { |
| | | 766 | | if (this.IsEnabled()) |
| | | 767 | | { |
| | | 768 | | this.MessageReceiverPumpUserCallbackStart(clientId, message?.SystemProperties.SequenceNumber ?? -1); |
| | | 769 | | } |
| | | 770 | | } |
| | | 771 | | |
| | | 772 | | [Event(71, Level = EventLevel.Informational, Message = "{0}: MessageReceiverPump UserCallback start: Message: Se |
| | | 773 | | void MessageReceiverPumpUserCallbackStart(string clientId, long sequenceNumber) |
| | | 774 | | { |
| | | 775 | | this.WriteEvent(71, clientId, sequenceNumber); |
| | | 776 | | } |
| | | 777 | | |
| | | 778 | | [NonEvent] |
| | | 779 | | public void MessageReceiverPumpUserCallbackStop(string clientId, Message message) |
| | | 780 | | { |
| | | 781 | | if (this.IsEnabled()) |
| | | 782 | | { |
| | | 783 | | this.MessageReceiverPumpUserCallbackStop(clientId, message?.SystemProperties.SequenceNumber ?? -1); |
| | | 784 | | } |
| | | 785 | | } |
| | | 786 | | |
| | | 787 | | [Event(72, Level = EventLevel.Informational, Message = "{0}: MessageReceiverPump UserCallback done: Message: Seq |
| | | 788 | | void MessageReceiverPumpUserCallbackStop(string clientId, long sequenceNumber) |
| | | 789 | | { |
| | | 790 | | this.WriteEvent(72, clientId, sequenceNumber); |
| | | 791 | | } |
| | | 792 | | |
| | | 793 | | [NonEvent] |
| | | 794 | | public void MessageReceiverPumpUserCallbackException(string clientId, Message message, Exception exception) |
| | | 795 | | { |
| | | 796 | | if (this.IsEnabled()) |
| | | 797 | | { |
| | | 798 | | this.MessageReceiverPumpUserCallbackException(clientId, message?.SystemProperties.SequenceNumber ?? -1, |
| | | 799 | | } |
| | | 800 | | } |
| | | 801 | | |
| | | 802 | | [Event(73, Level = EventLevel.Error, Message = "{0}: MessageReceiverPump UserCallback Exception: Message: Sequen |
| | | 803 | | void MessageReceiverPumpUserCallbackException(string clientId, long sequenceNumber, string exception) |
| | | 804 | | { |
| | | 805 | | this.WriteEvent(73, clientId, sequenceNumber, exception); |
| | | 806 | | } |
| | | 807 | | |
| | | 808 | | [NonEvent] |
| | | 809 | | public void MessageReceiverPumpRenewMessageStart(string clientId, Message message, TimeSpan renewAfterTimeSpan) |
| | | 810 | | { |
| | | 811 | | if (this.IsEnabled()) |
| | | 812 | | { |
| | | 813 | | this.MessageReceiverPumpRenewMessageStart(clientId, message?.SystemProperties.SequenceNumber ?? -1, (lon |
| | | 814 | | } |
| | | 815 | | } |
| | | 816 | | |
| | | 817 | | [Event(74, Level = EventLevel.Informational, Message = "{0}: MessageReceiverPump RenewMessage start: Message: Se |
| | | 818 | | void MessageReceiverPumpRenewMessageStart(string clientId, long sequenceNumber, long renewAfterTimeSpanInSeconds |
| | | 819 | | { |
| | | 820 | | this.WriteEvent(74, clientId, sequenceNumber, renewAfterTimeSpanInSeconds); |
| | | 821 | | } |
| | | 822 | | |
| | | 823 | | [NonEvent] |
| | | 824 | | public void MessageReceiverPumpRenewMessageStop(string clientId, Message message) |
| | | 825 | | { |
| | | 826 | | if (this.IsEnabled()) |
| | | 827 | | { |
| | | 828 | | this.MessageReceiverPumpRenewMessageStop(clientId, message?.SystemProperties.SequenceNumber ?? -1); |
| | | 829 | | } |
| | | 830 | | } |
| | | 831 | | |
| | | 832 | | [Event(75, Level = EventLevel.Informational, Message = "{0}: MessageReceiverPump RenewMessage done: Message: Seq |
| | | 833 | | void MessageReceiverPumpRenewMessageStop(string clientId, long sequenceNumber) |
| | | 834 | | { |
| | | 835 | | this.WriteEvent(75, clientId, sequenceNumber); |
| | | 836 | | } |
| | | 837 | | |
| | | 838 | | [NonEvent] |
| | | 839 | | public void MessageReceiverPumpRenewMessageException(string clientId, Message message, Exception exception) |
| | | 840 | | { |
| | | 841 | | if (this.IsEnabled()) |
| | | 842 | | { |
| | | 843 | | this.MessageReceiverPumpRenewMessageException(clientId, message?.SystemProperties.SequenceNumber ?? -1, |
| | | 844 | | } |
| | | 845 | | } |
| | | 846 | | |
| | | 847 | | [Event(76, Level = EventLevel.Error, Message = "{0}: MessageReceiverPump RenewMessage Exception: Message: Sequen |
| | | 848 | | void MessageReceiverPumpRenewMessageException(string clientId, long sequenceNumber, string exception) |
| | | 849 | | { |
| | | 850 | | this.WriteEvent(76, clientId, sequenceNumber, exception); |
| | | 851 | | } |
| | | 852 | | |
| | | 853 | | [NonEvent] |
| | | 854 | | public void RunOperationExceptionEncountered(Exception exception) |
| | | 855 | | { |
| | | 856 | | if (this.IsEnabled()) |
| | | 857 | | { |
| | | 858 | | this.RunOperationExceptionEncountered(exception.ToString()); |
| | | 859 | | } |
| | | 860 | | } |
| | | 861 | | |
| | | 862 | | [Event(77, Level = EventLevel.Warning, Message = "RunOperation encountered an exception and will retry. Exceptio |
| | | 863 | | void RunOperationExceptionEncountered(string exception) |
| | | 864 | | { |
| | | 865 | | this.WriteEvent(77, exception); |
| | | 866 | | } |
| | | 867 | | |
| | | 868 | | [NonEvent] |
| | | 869 | | public void RegisterOnSessionHandlerStart(string clientId, SessionHandlerOptions sessionHandlerOptions) |
| | | 870 | | { |
| | | 871 | | if (this.IsEnabled()) |
| | | 872 | | { |
| | | 873 | | this.RegisterOnSessionHandlerStart(clientId, sessionHandlerOptions.AutoComplete, sessionHandlerOptions.M |
| | | 874 | | } |
| | | 875 | | } |
| | | 876 | | |
| | | 877 | | [Event(78, Level = EventLevel.Informational, Message = "{0}: Register OnSessionHandler start: RegisterSessionHan |
| | | 878 | | void RegisterOnSessionHandlerStart(string clientId, bool autoComplete, int maxConcurrentSessions, long messageWa |
| | | 879 | | { |
| | | 880 | | this.WriteEvent(78, clientId, autoComplete, maxConcurrentSessions, messageWaitTimeoutInSeconds, autorenewTim |
| | | 881 | | } |
| | | 882 | | |
| | | 883 | | [Event(79, Level = EventLevel.Informational, Message = "{0}: Register OnSessionHandler done.")] |
| | | 884 | | public void RegisterOnSessionHandlerStop(string clientId) |
| | | 885 | | { |
| | | 886 | | if (this.IsEnabled()) |
| | | 887 | | { |
| | | 888 | | this.WriteEvent(79, clientId); |
| | | 889 | | } |
| | | 890 | | } |
| | | 891 | | |
| | | 892 | | [NonEvent] |
| | | 893 | | public void RegisterOnSessionHandlerException(string clientId, Exception exception) |
| | | 894 | | { |
| | | 895 | | if (this.IsEnabled()) |
| | | 896 | | { |
| | | 897 | | this.RegisterOnSessionHandlerException(clientId, exception.ToString()); |
| | | 898 | | } |
| | | 899 | | } |
| | | 900 | | |
| | | 901 | | [Event(80, Level = EventLevel.Error, Message = "{0}: Register OnSessionHandler Exception: {1}")] |
| | | 902 | | void RegisterOnSessionHandlerException(string clientId, string exception) |
| | | 903 | | { |
| | | 904 | | this.WriteEvent(80, clientId, exception); |
| | | 905 | | } |
| | | 906 | | |
| | | 907 | | [NonEvent] |
| | | 908 | | public void SessionReceivePumpSessionReceiveException(string clientId, Exception exception) |
| | | 909 | | { |
| | | 910 | | if (this.IsEnabled()) |
| | | 911 | | { |
| | | 912 | | this.SessionReceivePumpSessionReceiveException(clientId, exception.ToString()); |
| | | 913 | | } |
| | | 914 | | } |
| | | 915 | | |
| | | 916 | | [Event(81, Level = EventLevel.Error, Message = "{0}: Exception while Receving a session: SessionId: {1}")] |
| | | 917 | | void SessionReceivePumpSessionReceiveException(string clientId, string exception) |
| | | 918 | | { |
| | | 919 | | this.WriteEvent(81, clientId, exception); |
| | | 920 | | } |
| | | 921 | | |
| | | 922 | | [Event(82, Level = EventLevel.Informational, Message = "{0}: Session has no more messages: SessionId: {1}")] |
| | | 923 | | public void SessionReceivePumpSessionEmpty(string clientId, string sessionId) |
| | | 924 | | { |
| | | 925 | | if (this.IsEnabled()) |
| | | 926 | | { |
| | | 927 | | this.WriteEvent(82, clientId, sessionId); |
| | | 928 | | } |
| | | 929 | | } |
| | | 930 | | |
| | | 931 | | [Event(83, Level = EventLevel.Informational, Message = "{0}: Session closed: SessionId: {1}")] |
| | | 932 | | public void SessionReceivePumpSessionClosed(string clientId, string sessionId) |
| | | 933 | | { |
| | | 934 | | if (this.IsEnabled()) |
| | | 935 | | { |
| | | 936 | | this.WriteEvent(83, clientId, sessionId); |
| | | 937 | | } |
| | | 938 | | } |
| | | 939 | | |
| | | 940 | | [NonEvent] |
| | | 941 | | public void SessionReceivePumpSessionCloseException(string clientId, string sessionId, Exception exception) |
| | | 942 | | { |
| | | 943 | | if (this.IsEnabled()) |
| | | 944 | | { |
| | | 945 | | this.SessionReceivePumpSessionCloseException(clientId, sessionId, exception.ToString()); |
| | | 946 | | } |
| | | 947 | | } |
| | | 948 | | |
| | | 949 | | [Event(84, Level = EventLevel.Error, Message = "{0}: Exception while closing session: SessionId: {1}, Exception: |
| | | 950 | | void SessionReceivePumpSessionCloseException(string clientId, string sessionId, string exception) |
| | | 951 | | { |
| | | 952 | | this.WriteEvent(84, clientId, sessionId, exception); |
| | | 953 | | } |
| | | 954 | | |
| | | 955 | | [NonEvent] |
| | | 956 | | public void SessionReceivePumpSessionRenewLockStart(string clientId, string sessionId, TimeSpan renewAfterTimeSp |
| | | 957 | | { |
| | | 958 | | if (this.IsEnabled()) |
| | | 959 | | { |
| | | 960 | | this.SessionReceivePumpSessionRenewLockStart(clientId, sessionId, (long)renewAfterTimeSpan.TotalSeconds) |
| | | 961 | | } |
| | | 962 | | } |
| | | 963 | | |
| | | 964 | | [Event(85, Level = EventLevel.Informational, Message = "{0}: SessionRenewLock start. SessionId: {1}, RenewAfterT |
| | | 965 | | void SessionReceivePumpSessionRenewLockStart(string clientId, string sessionId, long totalSeconds) |
| | | 966 | | { |
| | | 967 | | this.WriteEvent(85, clientId, sessionId, totalSeconds); |
| | | 968 | | } |
| | | 969 | | |
| | | 970 | | [Event(86, Level = EventLevel.Informational, Message = "{0}: RenewSession done: SessionId: {1}")] |
| | | 971 | | public void SessionReceivePumpSessionRenewLockStop(string clientId, string sessionId) |
| | | 972 | | { |
| | | 973 | | if (this.IsEnabled()) |
| | | 974 | | { |
| | | 975 | | this.WriteEvent(86, clientId, sessionId); |
| | | 976 | | } |
| | | 977 | | } |
| | | 978 | | |
| | | 979 | | [NonEvent] |
| | | 980 | | public void SessionReceivePumpSessionRenewLockException(string clientId, string sessionId, Exception exception) |
| | | 981 | | { |
| | | 982 | | if (this.IsEnabled()) |
| | | 983 | | { |
| | | 984 | | this.SessionReceivePumpSessionRenewLockException(clientId, sessionId, exception.ToString()); |
| | | 985 | | } |
| | | 986 | | } |
| | | 987 | | |
| | | 988 | | [Event(87, Level = EventLevel.Error, Message = "{0}: Exception while renewing session lock: SessionId: {1}, Exce |
| | | 989 | | void SessionReceivePumpSessionRenewLockException(string clientId, string sessionId, string exception) |
| | | 990 | | { |
| | | 991 | | this.WriteEvent(87, clientId, sessionId, exception); |
| | | 992 | | } |
| | | 993 | | |
| | | 994 | | [NonEvent] |
| | | 995 | | public void AmqpSessionClientAcceptMessageSessionStart(string clientId, string entityPath, ReceiveMode receiveMo |
| | | 996 | | { |
| | | 997 | | if (this.IsEnabled()) |
| | | 998 | | { |
| | | 999 | | this.AmqpSessionClientAcceptMessageSessionStart(clientId, entityPath, receiveMode.ToString(), prefetchCo |
| | | 1000 | | } |
| | | 1001 | | } |
| | | 1002 | | |
| | | 1003 | | [Event(88, Level = EventLevel.Informational, Message = "{0}: AcceptMessageSession start: EntityPath: {1}, Receiv |
| | | 1004 | | void AmqpSessionClientAcceptMessageSessionStart(string clientId, string entityPath, string receiveMode, int pref |
| | | 1005 | | { |
| | | 1006 | | this.WriteEvent(88, clientId, entityPath, receiveMode, prefetchCount, sessionId); |
| | | 1007 | | } |
| | | 1008 | | |
| | | 1009 | | [Event(89, Level = EventLevel.Informational, Message = "{0}: AcceptMessageSession done: EntityPath: {1}, Session |
| | | 1010 | | public void AmqpSessionClientAcceptMessageSessionStop(string clientId, string entityPath, string sessionId) |
| | | 1011 | | { |
| | | 1012 | | if (this.IsEnabled()) |
| | | 1013 | | { |
| | | 1014 | | this.WriteEvent(89, clientId, entityPath, sessionId); |
| | | 1015 | | } |
| | | 1016 | | } |
| | | 1017 | | |
| | | 1018 | | [NonEvent] |
| | | 1019 | | public void AmqpSessionClientAcceptMessageSessionException(string clientId, string entityPath, Exception excepti |
| | | 1020 | | { |
| | | 1021 | | if (this.IsEnabled()) |
| | | 1022 | | { |
| | | 1023 | | this.AmqpSessionClientAcceptMessageSessionException(clientId, entityPath, exception.ToString()); |
| | | 1024 | | } |
| | | 1025 | | } |
| | | 1026 | | |
| | | 1027 | | [Event(90, Level = EventLevel.Error, Message = "{0}: AcceptMessageSession Exception: EntityPath: {1}, Exception: |
| | | 1028 | | void AmqpSessionClientAcceptMessageSessionException(string clientId, string entityPath, string exception) |
| | | 1029 | | { |
| | | 1030 | | this.WriteEvent(90, clientId, entityPath, exception); |
| | | 1031 | | } |
| | | 1032 | | |
| | | 1033 | | [NonEvent] |
| | | 1034 | | public void AmqpLinkCreationException(string entityPath, AmqpSession session, AmqpConnection connection, Excepti |
| | | 1035 | | { |
| | | 1036 | | if (this.IsEnabled()) |
| | | 1037 | | { |
| | | 1038 | | this.AmqpLinkCreationException(entityPath, session.ToString(), session.State.ToString(), session.GetInne |
| | | 1039 | | } |
| | | 1040 | | } |
| | | 1041 | | |
| | | 1042 | | [Event(91, Level = EventLevel.Error, Message = "AmqpLinkCreatorException Exception: EntityPath: {0}, SessionStri |
| | | 1043 | | void AmqpLinkCreationException(string entityPath, string session, string sessionState, string terminalException, |
| | | 1044 | | { |
| | | 1045 | | this.WriteEvent(91, entityPath, session, sessionState, terminalException, connectionInfo, connectionState, e |
| | | 1046 | | } |
| | | 1047 | | |
| | | 1048 | | [NonEvent] |
| | | 1049 | | public void AmqpConnectionCreated(string hostName, AmqpConnection connection) |
| | | 1050 | | { |
| | | 1051 | | if (this.IsEnabled()) |
| | | 1052 | | { |
| | | 1053 | | this.AmqpConnectionCreated(hostName, connection.ToString(), connection.State.ToString()); |
| | | 1054 | | } |
| | | 1055 | | } |
| | | 1056 | | |
| | | 1057 | | [Event(92, Level = EventLevel.Verbose, Message = "AmqpConnectionCreated: HostName: {0}, ConnectionInfo: {1}, Con |
| | | 1058 | | void AmqpConnectionCreated(string hostName, string connectionInfo, string connectionState) |
| | | 1059 | | { |
| | | 1060 | | this.WriteEvent(92, hostName, connectionInfo, connectionState); |
| | | 1061 | | } |
| | | 1062 | | |
| | | 1063 | | [NonEvent] |
| | | 1064 | | public void AmqpConnectionClosed(AmqpConnection connection) |
| | | 1065 | | { |
| | | 1066 | | if (this.IsEnabled()) |
| | | 1067 | | { |
| | | 1068 | | this.AmqpConnectionClosed(connection.RemoteEndpoint, connection.ToString(), connection.State.ToString()) |
| | | 1069 | | } |
| | | 1070 | | } |
| | | 1071 | | |
| | | 1072 | | [Event(93, Level = EventLevel.Verbose, Message = "AmqpConnectionClosed: HostName: {0}, ConnectionInfo: {1}, Conn |
| | | 1073 | | public void AmqpConnectionClosed(string hostName, string connectionInfo, string connectionState) |
| | | 1074 | | { |
| | | 1075 | | this.WriteEvent(93, hostName, connectionInfo, connectionState); |
| | | 1076 | | } |
| | | 1077 | | |
| | | 1078 | | [NonEvent] |
| | | 1079 | | public void AmqpSessionCreationException(string entityPath, AmqpConnection connection, Exception exception) |
| | | 1080 | | { |
| | | 1081 | | if (this.IsEnabled()) |
| | | 1082 | | { |
| | | 1083 | | this.AmqpSessionCreationException(entityPath, connection.ToString(), connection.State.ToString(), except |
| | | 1084 | | } |
| | | 1085 | | } |
| | | 1086 | | |
| | | 1087 | | [Event(94, Level = EventLevel.Error, Message = "AmqpSessionCreationException Exception: EntityPath: {0}, Connect |
| | | 1088 | | void AmqpSessionCreationException(string entityPath, string connectionInfo, string connectionState, string excep |
| | | 1089 | | { |
| | | 1090 | | this.WriteEvent(94, entityPath, connectionInfo, connectionState, exception); |
| | | 1091 | | } |
| | | 1092 | | |
| | | 1093 | | [Event(95, Level = EventLevel.Verbose, Message = "User plugin {0} called on message {1}")] |
| | | 1094 | | public void PluginCallStarted(string pluginName, string messageId) |
| | | 1095 | | { |
| | | 1096 | | if (this.IsEnabled()) |
| | | 1097 | | { |
| | | 1098 | | this.WriteEvent(95, pluginName, messageId); |
| | | 1099 | | } |
| | | 1100 | | } |
| | | 1101 | | |
| | | 1102 | | [Event(96, Level = EventLevel.Verbose, Message = "User plugin {0} completed on message {1}")] |
| | | 1103 | | public void PluginCallCompleted(string pluginName, string messageId) |
| | | 1104 | | { |
| | | 1105 | | if (this.IsEnabled()) |
| | | 1106 | | { |
| | | 1107 | | this.WriteEvent(96, pluginName, messageId); |
| | | 1108 | | } |
| | | 1109 | | } |
| | | 1110 | | |
| | | 1111 | | [NonEvent] |
| | | 1112 | | public void PluginCallFailed(string pluginName, string messageId, Exception exception) |
| | | 1113 | | { |
| | | 1114 | | if (this.IsEnabled()) |
| | | 1115 | | { |
| | | 1116 | | this.PluginCallFailed(pluginName, messageId, exception.ToString()); |
| | | 1117 | | } |
| | | 1118 | | } |
| | | 1119 | | |
| | | 1120 | | [Event(97, Level = EventLevel.Error, Message = "Exception during {0} plugin execution. MessageId: {1}, Exception |
| | | 1121 | | void PluginCallFailed(string pluginName, string messageId, string exception) |
| | | 1122 | | { |
| | | 1123 | | this.WriteEvent(97, pluginName, messageId, exception); |
| | | 1124 | | } |
| | | 1125 | | |
| | | 1126 | | [NonEvent] |
| | | 1127 | | public void ScheduleTaskFailed(Func<Task> task, Exception exception) |
| | | 1128 | | { |
| | | 1129 | | if (this.IsEnabled()) |
| | | 1130 | | { |
| | | 1131 | | this.ScheduleTaskFailed(task.Target.GetType().FullName, task.GetMethodInfo().Name, exception.ToString()) |
| | | 1132 | | } |
| | | 1133 | | } |
| | | 1134 | | |
| | | 1135 | | [Event(98, Level = EventLevel.Error, Message = "Exception during Schedule Task. FunctionTargetName: {0}, MethodI |
| | | 1136 | | void ScheduleTaskFailed(string funcTargetName, string methodInfoName, string exception) |
| | | 1137 | | { |
| | | 1138 | | WriteEvent(98, funcTargetName, methodInfoName, exception); |
| | | 1139 | | } |
| | | 1140 | | |
| | | 1141 | | [NonEvent] |
| | | 1142 | | public void ExceptionReceivedHandlerThrewException(Exception exception) |
| | | 1143 | | { |
| | | 1144 | | if (this.IsEnabled()) |
| | | 1145 | | { |
| | | 1146 | | this.ExceptionReceivedHandlerThrewException(exception.ToString()); |
| | | 1147 | | } |
| | | 1148 | | } |
| | | 1149 | | |
| | | 1150 | | [Event(99, Level = EventLevel.Error, Message = "ExceptionReceivedHandler threw exception. Exception:{0}")] |
| | | 1151 | | void ExceptionReceivedHandlerThrewException(string exception) |
| | | 1152 | | { |
| | | 1153 | | WriteEvent(99, exception); |
| | | 1154 | | } |
| | | 1155 | | |
| | | 1156 | | [NonEvent] |
| | | 1157 | | public void LinkStateLost(string clientId, string receiveLinkName, AmqpObjectState receiveLinkState, bool isSess |
| | | 1158 | | { |
| | | 1159 | | if (this.IsEnabled()) |
| | | 1160 | | { |
| | | 1161 | | this.LinkStateLost(clientId, receiveLinkName, receiveLinkState.ToString(), isSessionReceiver, exception. |
| | | 1162 | | } |
| | | 1163 | | } |
| | | 1164 | | |
| | | 1165 | | [Event(100, Level = EventLevel.Error, Message = "Link state lost. Throwing LockLostException for clientId: {0}, |
| | | 1166 | | void LinkStateLost(string clientId, string receiveLinkName, string receiveLinkState, bool isSessionReceiver, str |
| | | 1167 | | { |
| | | 1168 | | WriteEvent(100, clientId, receiveLinkName, receiveLinkState, isSessionReceiver, exception); |
| | | 1169 | | } |
| | | 1170 | | |
| | | 1171 | | [Event(101, Level = EventLevel.Informational, Message = "Updating client id. OldClientId: {0}, NewClientId: {1}" |
| | | 1172 | | public void UpdateClientId(string oldClientId, string newClientId) |
| | | 1173 | | { |
| | | 1174 | | if (this.IsEnabled()) |
| | | 1175 | | { |
| | | 1176 | | WriteEvent(101, oldClientId, newClientId); |
| | | 1177 | | } |
| | | 1178 | | } |
| | | 1179 | | |
| | | 1180 | | [Event(102, Level = EventLevel.Informational, Message = "{0}: GetRulesException start.")] |
| | | 1181 | | public void GetRulesStart(string clientId) |
| | | 1182 | | { |
| | | 1183 | | if (this.IsEnabled()) |
| | | 1184 | | { |
| | | 1185 | | this.WriteEvent(102, clientId); |
| | | 1186 | | } |
| | | 1187 | | } |
| | | 1188 | | |
| | | 1189 | | [Event(103, Level = EventLevel.Informational, Message = "{0}: GetRulesException done.")] |
| | | 1190 | | public void GetRulesStop(string clientId) |
| | | 1191 | | { |
| | | 1192 | | if (this.IsEnabled()) |
| | | 1193 | | { |
| | | 1194 | | this.WriteEvent(103, clientId); |
| | | 1195 | | } |
| | | 1196 | | } |
| | | 1197 | | |
| | | 1198 | | [NonEvent] |
| | | 1199 | | public void GetRulesException(string clientId, Exception exception) |
| | | 1200 | | { |
| | | 1201 | | if (this.IsEnabled()) |
| | | 1202 | | { |
| | | 1203 | | this.GetRulesException(clientId, exception.ToString()); |
| | | 1204 | | } |
| | | 1205 | | } |
| | | 1206 | | |
| | | 1207 | | [Event(104, Level = EventLevel.Error, Message = "{0}: GetRulesException Exception: {1}.")] |
| | | 1208 | | void GetRulesException(string clientId, string exception) |
| | | 1209 | | { |
| | | 1210 | | this.WriteEvent(104, clientId, exception); |
| | | 1211 | | } |
| | | 1212 | | |
| | | 1213 | | [NonEvent] |
| | | 1214 | | public void CreatingNewLink(string clientId, bool isSessionReceiver, string sessionId, bool isRequestResponseLin |
| | | 1215 | | { |
| | | 1216 | | if (this.IsEnabled()) |
| | | 1217 | | { |
| | | 1218 | | this.CreatingNewLink(clientId, isSessionReceiver, sessionId ?? string.Empty, isRequestResponseLink, link |
| | | 1219 | | } |
| | | 1220 | | } |
| | | 1221 | | |
| | | 1222 | | [Event(105, Level = EventLevel.Informational, Message = "Creating/Recreating New Link. ClientId: {0}, IsSessionR |
| | | 1223 | | void CreatingNewLink(string clientId, bool isSessionReceiver, string sessionId, bool isRequestResponseLink, stri |
| | | 1224 | | { |
| | | 1225 | | WriteEvent(105, clientId, isSessionReceiver, sessionId, isRequestResponseLink, linkError); |
| | | 1226 | | } |
| | | 1227 | | |
| | | 1228 | | [NonEvent] |
| | | 1229 | | public void SessionReceiverLinkClosed(string clientId, string sessionId, Exception linkException) |
| | | 1230 | | { |
| | | 1231 | | if (this.IsEnabled()) |
| | | 1232 | | { |
| | | 1233 | | this.SessionReceiverLinkClosed(clientId, sessionId ?? string.Empty, linkException?.ToString() ?? string. |
| | | 1234 | | } |
| | | 1235 | | } |
| | | 1236 | | |
| | | 1237 | | [Event(106, Level = EventLevel.Error, Message = "SessionReceiver Link Closed. ClientId: {0}, SessionId: {1}, lin |
| | | 1238 | | void SessionReceiverLinkClosed(string clientId, string sessionId, string linkException) |
| | | 1239 | | { |
| | | 1240 | | WriteEvent(106, clientId, sessionId, linkException); |
| | | 1241 | | } |
| | | 1242 | | |
| | | 1243 | | [NonEvent] |
| | | 1244 | | public void AmqpSendAuthenticationTokenException(string clientId, Exception exception) |
| | | 1245 | | { |
| | | 1246 | | if (this.IsEnabled()) |
| | | 1247 | | { |
| | | 1248 | | this.AmqpSendAuthenticationTokenException(clientId, exception.ToString()); |
| | | 1249 | | } |
| | | 1250 | | } |
| | | 1251 | | |
| | | 1252 | | [Event(107, Level = EventLevel.Error, Message = "{0}: AmqpSendAuthenticationTokenException Exception: {1}.")] |
| | | 1253 | | void AmqpSendAuthenticationTokenException(string clientId, string exception) |
| | | 1254 | | { |
| | | 1255 | | this.WriteEvent(107, clientId, exception); |
| | | 1256 | | } |
| | | 1257 | | |
| | | 1258 | | [NonEvent] |
| | | 1259 | | public void AmqpTransactionInitializeException(string transactionId, Exception exception) |
| | | 1260 | | { |
| | | 1261 | | if (this.IsEnabled()) |
| | | 1262 | | { |
| | | 1263 | | this.AmqpTransactionInitializeException(transactionId, exception.ToString()); |
| | | 1264 | | } |
| | | 1265 | | } |
| | | 1266 | | |
| | | 1267 | | [Event(108, Level = EventLevel.Error, Message = "AmqpTransactionInitializeException for TransactionId: {0} Excep |
| | | 1268 | | void AmqpTransactionInitializeException(string transactionId, string exception) |
| | | 1269 | | { |
| | | 1270 | | this.WriteEvent(108, transactionId, exception); |
| | | 1271 | | } |
| | | 1272 | | |
| | | 1273 | | [NonEvent] |
| | | 1274 | | public void AmqpTransactionDeclared(string localTransactionId, ArraySegment<byte> amqpTransactionId) |
| | | 1275 | | { |
| | | 1276 | | if (this.IsEnabled()) |
| | | 1277 | | { |
| | | 1278 | | this.AmqpTransactionDeclared(localTransactionId, amqpTransactionId.GetAsciiString()); |
| | | 1279 | | } |
| | | 1280 | | } |
| | | 1281 | | |
| | | 1282 | | [Event(109, Level = EventLevel.Informational, Message = "AmqpTransactionDeclared for LocalTransactionId: {0} Amq |
| | | 1283 | | void AmqpTransactionDeclared(string transactionId, string amqpTransactionId) |
| | | 1284 | | { |
| | | 1285 | | this.WriteEvent(109, transactionId, amqpTransactionId); |
| | | 1286 | | } |
| | | 1287 | | |
| | | 1288 | | [NonEvent] |
| | | 1289 | | public void AmqpTransactionDischarged(string localTransactionId, ArraySegment<byte> amqpTransactionId, bool roll |
| | | 1290 | | { |
| | | 1291 | | if (this.IsEnabled()) |
| | | 1292 | | { |
| | | 1293 | | this.AmqpTransactionDischarged(localTransactionId, amqpTransactionId.GetAsciiString(), rollback); |
| | | 1294 | | } |
| | | 1295 | | } |
| | | 1296 | | |
| | | 1297 | | [Event(110, Level = EventLevel.Informational, Message = "AmqpTransactionDischarged for LocalTransactionId: {0} A |
| | | 1298 | | void AmqpTransactionDischarged(string transactionId, string amqpTransactionId, bool rollback) |
| | | 1299 | | { |
| | | 1300 | | this.WriteEvent(110, transactionId, amqpTransactionId, rollback); |
| | | 1301 | | } |
| | | 1302 | | |
| | | 1303 | | [NonEvent] |
| | | 1304 | | public void AmqpTransactionDischargeException(string transactionId, ArraySegment<byte> amqpTransactionId, Except |
| | | 1305 | | { |
| | | 1306 | | if (this.IsEnabled()) |
| | | 1307 | | { |
| | | 1308 | | this.AmqpTransactionDischargeException(transactionId, amqpTransactionId.GetAsciiString(), exception.ToSt |
| | | 1309 | | } |
| | | 1310 | | } |
| | | 1311 | | |
| | | 1312 | | [Event(111, Level = EventLevel.Error, Message = "AmqpTransactionDischargeException for TransactionId: {0} AmqpTr |
| | | 1313 | | void AmqpTransactionDischargeException(string transactionId, string amqpTransactionId, string exception) |
| | | 1314 | | { |
| | | 1315 | | this.WriteEvent(111, transactionId, amqpTransactionId, exception); |
| | | 1316 | | } |
| | | 1317 | | |
| | | 1318 | | [NonEvent] |
| | | 1319 | | public void AmqpCreateControllerException(string connectionManager, Exception exception) |
| | | 1320 | | { |
| | | 1321 | | if (this.IsEnabled()) |
| | | 1322 | | { |
| | | 1323 | | this.AmqpCreateControllerException(connectionManager, exception.ToString()); |
| | | 1324 | | } |
| | | 1325 | | } |
| | | 1326 | | |
| | | 1327 | | [Event(112, Level = EventLevel.Error, Message = "AmqpCreateControllerException for ConnectionManager: {0} Except |
| | | 1328 | | void AmqpCreateControllerException(string connectionManager, string exception) |
| | | 1329 | | { |
| | | 1330 | | this.WriteEvent(112, connectionManager, exception); |
| | | 1331 | | } |
| | | 1332 | | |
| | | 1333 | | [Event(113, Level = EventLevel.Informational, Message = "{0}: Management operation '{1}' for '{2}' started.")] |
| | | 1334 | | public void ManagementOperationStart(string clientId, string operationName, string details = "") |
| | | 1335 | | { |
| | | 1336 | | if (this.IsEnabled()) |
| | | 1337 | | { |
| | | 1338 | | this.WriteEvent(113, clientId, operationName, details); |
| | | 1339 | | } |
| | | 1340 | | } |
| | | 1341 | | |
| | | 1342 | | [Event(114, Level = EventLevel.Informational, Message = "{0}: Management operation '{1}' for '{2}' finished.")] |
| | | 1343 | | public void ManagementOperationEnd(string clientId, string operationName, string details = "") |
| | | 1344 | | { |
| | | 1345 | | if (this.IsEnabled()) |
| | | 1346 | | { |
| | | 1347 | | this.WriteEvent(114, clientId, operationName, details); |
| | | 1348 | | } |
| | | 1349 | | } |
| | | 1350 | | |
| | | 1351 | | [NonEvent] |
| | | 1352 | | public void ManagementOperationException(string clientId, string operationName, Exception exception) |
| | | 1353 | | { |
| | | 1354 | | if (this.IsEnabled()) |
| | | 1355 | | { |
| | | 1356 | | this.ManagementOperationException(clientId, operationName, exception.ToString()); |
| | | 1357 | | } |
| | | 1358 | | } |
| | | 1359 | | |
| | | 1360 | | [Event(115, Level = EventLevel.Error, Message = "{0}: Management operation '{1}' encountered exception: '{2}'.") |
| | | 1361 | | void ManagementOperationException(string clientId, string operationName, string exception) |
| | | 1362 | | { |
| | | 1363 | | this.WriteEvent(115, clientId, operationName, exception); |
| | | 1364 | | } |
| | | 1365 | | |
| | | 1366 | | [Event(116, Level = EventLevel.Informational, Message = "{0}: Management client created with operationTimeout:{1 |
| | | 1367 | | public void ManagementClientCreated(string clientId, double operationTimeout, string tokenProvider) |
| | | 1368 | | { |
| | | 1369 | | if (this.IsEnabled()) |
| | | 1370 | | { |
| | | 1371 | | this.WriteEvent(116, clientId, operationTimeout, tokenProvider); |
| | | 1372 | | } |
| | | 1373 | | } |
| | | 1374 | | |
| | | 1375 | | [Event(117, Level = EventLevel.Warning, Message = "[De]Serialization failed for object:{0}; Details:{1}")] |
| | | 1376 | | public void ManagementSerializationException(string objectName, string details = "") |
| | | 1377 | | { |
| | | 1378 | | if (this.IsEnabled()) |
| | | 1379 | | { |
| | | 1380 | | this.WriteEvent(117, objectName, details); |
| | | 1381 | | } |
| | | 1382 | | } |
| | | 1383 | | } |
| | | 1384 | | |
| | | 1385 | | internal static class TraceHelper |
| | | 1386 | | { |
| | | 1387 | | public static string GetAsciiString(this ArraySegment<byte> arraySegment) |
| | | 1388 | | { |
| | 0 | 1389 | | return arraySegment.Array == null ? string.Empty : Encoding.ASCII.GetString(arraySegment.Array, arraySegment |
| | | 1390 | | } |
| | | 1391 | | } |
| | | 1392 | | } |