172 references to MessageLogger
System.ServiceModel (172)
System\ServiceModel\Administration\AppDomainInstanceProvider.cs (13)
68
instance.SetProperty(AdministrationStrings.LogMalformedMessages,
MessageLogger
.LogMalformedMessages);
69
instance.SetProperty(AdministrationStrings.LogMessagesAtServiceLevel,
MessageLogger
.LogMessagesAtServiceLevel);
70
instance.SetProperty(AdministrationStrings.LogMessagesAtTransportLevel,
MessageLogger
.LogMessagesAtTransportLevel);
123
traceSource =
MessageLogger
.MessageTraceSource;
157
if (
MessageLogger
.LogMalformedMessages != logMalformedMessages)
163
MessageLogger
.LogMalformedMessages,
166
MessageLogger
.LogMalformedMessages = logMalformedMessages;
170
if (
MessageLogger
.LogMessagesAtServiceLevel != logMessagesAtServiceLevel)
176
MessageLogger
.LogMessagesAtServiceLevel,
179
MessageLogger
.LogMessagesAtServiceLevel = logMessagesAtServiceLevel;
183
if (
MessageLogger
.LogMessagesAtTransportLevel != logMessagesAtTransportLevel)
189
MessageLogger
.LogMessagesAtTransportLevel,
192
MessageLogger
.LogMessagesAtTransportLevel = logMessagesAtTransportLevel;
System\ServiceModel\Channels\BinaryMessageEncoder.cs (9)
644
MessageLogger
.LogMessage(buffer, MessageLoggingSource.Malformed);
678
if (
MessageLogger
.LogMessagesAtTransportLevel)
680
MessageLogger
.LogMessage(ref message, MessageLoggingSource.TransportReceive);
716
if (
MessageLogger
.LogMessagesAtTransportLevel)
718
MessageLogger
.LogMessage(ref message, MessageLoggingSource.TransportReceive);
789
if (
MessageLogger
.LogMessagesAtTransportLevel && !this.readerSessionForLoggingIsInvalid)
806
MessageLogger
.LogMessage(ref message, xmlDictionaryReader, MessageLoggingSource.TransportSend);
874
if (
MessageLogger
.LogMessagesAtTransportLevel)
876
MessageLogger
.LogMessage(ref message, MessageLoggingSource.TransportSend);
System\ServiceModel\Channels\HttpChannelHelpers.cs (10)
372
if (
MessageLogger
.LoggingEnabled && message.Version.Addressing == AddressingVersion.None)
374
MessageLogger
.LogMessage(ref message, MessageLoggingSource.TransportReceive | MessageLoggingSource.LastChance);
387
if (
MessageLogger
.ShouldLogMalformed)
393
MessageLogger
.LogMessage(stream, MessageLoggingSource.Malformed);
400
if (
MessageLogger
.ShouldLogMalformed)
406
MessageLogger
.LogMessage(stream, MessageLoggingSource.Malformed);
1244
if (
MessageLogger
.LogMessagesAtTransportLevel)
1376
if (
MessageLogger
.LogMessagesAtTransportLevel)
1855
if (
MessageLogger
.LogMessagesAtTransportLevel)
1857
MessageLogger
.LogMessage(ref message, MessageLoggingSource.TransportSend);
System\ServiceModel\Channels\Message.cs (2)
1560
if (throwing &&
MessageLogger
.LoggingEnabled)
1562
MessageLogger
.LogMessage(messageData.Buffer, MessageLoggingSource.Malformed);
System\ServiceModel\Channels\MtomMessageEncoder.cs (8)
244
if (
MessageLogger
.LogMessagesAtTransportLevel)
245
MessageLogger
.LogMessage(ref message, MessageLoggingSource.TransportReceive);
280
if (
MessageLogger
.LogMessagesAtTransportLevel)
281
MessageLogger
.LogMessage(ref message, MessageLoggingSource.TransportReceive);
350
if (
MessageLogger
.LogMessagesAtTransportLevel)
357
MessageLogger
.LogMessage(ref message, xmlDictionaryReader, MessageLoggingSource.TransportSend);
404
if (
MessageLogger
.LogMessagesAtTransportLevel)
405
MessageLogger
.LogMessage(ref message, MessageLoggingSource.TransportSend);
System\ServiceModel\Channels\ServiceChannel.cs (4)
695
if (
MessageLogger
.LogMessagesAtServiceLevel)
697
MessageLogger
.LogMessage(ref rpc.Request, (oneway ? MessageLoggingSource.ServiceLevelSendDatagram : MessageLoggingSource.ServiceLevelSendRequest) | MessageLoggingSource.LastChance);
988
if (
MessageLogger
.LogMessagesAtServiceLevel)
990
MessageLogger
.LogMessage(ref rpc.Reply, MessageLoggingSource.ServiceLevelReceiveReply | MessageLoggingSource.LastChance);
System\ServiceModel\Channels\TextMessageEncoder.cs (10)
436
if (
MessageLogger
.LogMessagesAtTransportLevel)
437
MessageLogger
.LogMessage(ref message, MessageLoggingSource.TransportReceive);
461
if (
MessageLogger
.LogMessagesAtTransportLevel)
462
MessageLogger
.LogMessage(ref message, MessageLoggingSource.TransportReceive);
501
if (
MessageLogger
.LogMessagesAtTransportLevel)
504
MessageLogger
.LogMessage(ref message, xmlDictionaryReader, MessageLoggingSource.TransportSend);
545
if (
MessageLogger
.LogMessagesAtTransportLevel)
546
MessageLogger
.LogMessage(ref message, MessageLoggingSource.TransportSend);
625
if (
MessageLogger
.LogMessagesAtTransportLevel)
626
MessageLogger
.LogMessage(ref message, MessageLoggingSource.TransportSend);
System\ServiceModel\Diagnostics\MessageLogger.cs (104)
70
get { return
MessageLogger
.Filters.Count; }
75
get { return
MessageLogger
.FilterCount > 0 && (
MessageLogger
.numberOfMessagesToLog > 0 ||
MessageLogger
.numberOfMessagesToLog ==
MessageLogger
.Unlimited); }
82
Fx.Assert(
MessageLogger
.initialized, "MessageLogger should be initialized before trying to retrieve LogKnownPii");
83
return
MessageLogger
.logKnownPii;
87
MessageLogger
.logKnownPii = value;
93
get { return (
MessageLogger
.Sources & MessageLoggingSource.Malformed) != 0; }
96
lock (
MessageLogger
.syncObject)
102
if (!
MessageLogger
.inPartialTrust)
104
MessageLogger
.sources |= MessageLoggingSource.Malformed;
109
MessageLogger
.sources &= MessageLoggingSource.All & ~MessageLoggingSource.Malformed;
121
get { return (
MessageLogger
.Sources & MessageLoggingSource.ServiceLevel) != 0; }
124
lock (
MessageLogger
.syncObject)
130
if (!
MessageLogger
.inPartialTrust)
132
MessageLogger
.sources |= MessageLoggingSource.ServiceLevel;
137
MessageLogger
.sources &= MessageLoggingSource.All & ~MessageLoggingSource.ServiceLevel;
149
get { return (
MessageLogger
.Sources & MessageLoggingSource.Transport) != 0; }
152
lock (
MessageLogger
.syncObject)
158
if (!
MessageLogger
.inPartialTrust)
160
MessageLogger
.sources |= MessageLoggingSource.Transport;
165
MessageLogger
.sources &= MessageLoggingSource.All & ~MessageLoggingSource.Transport;
179
Fx.Assert(
MessageLogger
.initialized, "");
187
get { return
MessageLogger
.Sources != default(MessageLoggingSource); }
194
Fx.Assert(
MessageLogger
.initialized, "");
204
Fx.Assert(
MessageLogger
.initialized, "");
210
lock (
MessageLogger
.syncObject)
213
MessageLogger
.numberOfMessagesToLog = maxMessagesToLog;
222
if (
MessageLogger
.messageFilterTable == null)
224
lock (
MessageLogger
.filterLock)
226
if (
MessageLogger
.messageFilterTable == null)
229
MessageLogger
.messageFilterTable = temp;
234
return
MessageLogger
.messageFilterTable;
242
if (!
MessageLogger
.initialized)
244
MessageLogger
.EnsureInitialized();
246
return
MessageLogger
.sources;
257
MessageLogger
.Filters.Add(filter);
268
return (source &
MessageLogger
.Sources) != 0 &&
269
((
MessageLogger
.MessageTraceSource != null) ||
355
if (ShouldLogMessages(source) && (
MessageLogger
.numberOfMessagesToLog > 0 ||
MessageLogger
.numberOfMessagesToLog ==
MessageLogger
.Unlimited))
364
if (
MessageLogger
.numberOfMessagesToLog ==
MessageLogger
.Unlimited ||
MessageLogger
.numberOfMessagesToLog > 0)
366
MessageLogTraceRecord record = new MessageLogTraceRecord(ref message, reader, source,
MessageLogger
.LogMessageBody);
386
foreach (string securityAction in
MessageLogger
.SecurityActions)
403
PlainXmlWriter xmlWriter = new PlainXmlWriter(
MessageLogger
.MaxMessageSize);
411
if ((
MessageLogger
.messageTraceSource != null &&
412
!
MessageLogger
.messageTraceSource.ShouldLogPii) ||
413
!
MessageLogger
.LogKnownPii)
415
navigator.RemovePii(
MessageLogger
.PiiHeadersPaths);
416
if (
MessageLogger
.LogMessageBody && null != record.Message)
420
navigator.RemovePii(
MessageLogger
.PiiBodyPaths);
439
if (
MessageLogger
.numberOfMessagesToLog > 0)
441
lock (
MessageLogger
.syncObject)
443
if (
MessageLogger
.numberOfMessagesToLog > 0)
445
MessageLogger
.numberOfMessagesToLog--;
446
if (0 ==
MessageLogger
.numberOfMessagesToLog)
458
lock (
MessageLogger
.syncObject)
460
if (!
MessageLogger
.lastWriteSucceeded)
462
MessageLogger
.lastWriteSucceeded = true;
471
lock (
MessageLogger
.syncObject)
473
if (
MessageLogger
.lastWriteSucceeded)
475
MessageLogger
.lastWriteSucceeded = false;
510
if (
MessageLogger
.MessageTraceSource != null)
512
MessageLogger
.MessageTraceSource.TraceData(TraceEventType.Information, 0, data);
520
if (
MessageLogger
.FilterMessages && (source & MessageLoggingSource.Malformed) == 0)
524
lock (
MessageLogger
.syncObject)
526
foreach (XPathMessageFilter filter in
MessageLogger
.Filters)
552
MessageLogger
.Filters.Remove(filter);
561
if (
MessageLogger
.FilterCount == 0)
584
return
MessageLogger
.messageTraceSource;
590
lock (
MessageLogger
.syncObject)
592
if (!
MessageLogger
.initialized && !
MessageLogger
.initializing)
602
MessageLogger
.inPartialTrust = true;
618
MessageLogger
.initialized = true;
625
if (!
MessageLogger
.initialized)
627
MessageLogger
.EnsureInitialized();
629
if (null ==
MessageLogger
.MessageTraceSource && !
MessageLogger
.attemptedTraceSourceInitialization)
708
MessageLogger
.initializing = true;
713
MessageLogger
.LogKnownPii = section.MessageLogging.LogKnownPii && MachineSettingsSection.EnableLoggingKnownPii;
714
MessageLogger
.LogMalformedMessages = section.MessageLogging.LogMalformedMessages;
715
MessageLogger
.LogMessageBody = section.MessageLogging.LogEntireMessage;
716
MessageLogger
.LogMessagesAtServiceLevel = section.MessageLogging.LogMessagesAtServiceLevel;
717
MessageLogger
.LogMessagesAtTransportLevel = section.MessageLogging.LogMessagesAtTransportLevel;
718
MessageLogger
.MaxNumberOfMessagesToLog = section.MessageLogging.MaxMessagesToLog;
719
MessageLogger
.MaxMessageSize = section.MessageLogging.MaxSizeOfMessageToLog;
729
MessageLogger
.attemptedTraceSourceInitialization = true;
730
PiiTraceSource tempSource = new PiiTraceSource(
MessageLogger
.MessageTraceSourceName, DiagnosticUtility.EventSourceName);
732
tempSource.Listeners.Remove(
MessageLogger
.DefaultTraceListenerName);
744
MessageLogger
.messageTraceSource = tempSource;
754
MessageLogger
.inPartialTrust = true;
771
MessageLogger
.messageTraceSource = null;
793
lock (
MessageLogger
.syncObject)
795
if (null !=
MessageLogger
.MessageTraceSource)
798
MessageLogger
.MessageTraceSource.Close();
799
MessageLogger
.messageTraceSource = null;
816
if (null !=
MessageLogger
.messageTraceSource)
836
result =
MessageLogger
.sources == MessageLoggingSource.None;
840
result =
MessageLogger
.sources == source;
System\ServiceModel\Diagnostics\MessageLogTraceRecord.cs (1)
76
int count =
MessageLogger
.MaxMessageSize;
System\ServiceModel\Diagnostics\TraceUtility.cs (4)
633
if (
MessageLogger
.LogMessagesAtServiceLevel)
635
MessageLogger
.LogMessage(ref message, MessageLoggingSource.ServiceLevelReceiveReply | MessageLoggingSource.LastChance);
653
if (
MessageLogger
.LogMessagesAtServiceLevel)
655
MessageLogger
.LogMessage(ref message, MessageLoggingSource.ServiceLevelSendRequest | MessageLoggingSource.LastChance);
System\ServiceModel\Dispatcher\ChannelHandler.cs (2)
436
if (
MessageLogger
.LoggingEnabled)
438
MessageLogger
.LogMessage(ref message, (operation.IsOneWay ? MessageLoggingSource.ServiceLevelReceiveDatagram : MessageLoggingSource.ServiceLevelReceiveRequest) | MessageLoggingSource.LastChance);
System\ServiceModel\Dispatcher\DispatchOperationRuntime.cs (4)
320
if (!success &&
MessageLogger
.LoggingEnabled)
322
MessageLogger
.LogMessage(ref rpc.Request, MessageLoggingSource.Malformed);
859
if (
MessageLogger
.LoggingEnabled && null != reply)
861
MessageLogger
.LogMessage(ref reply, MessageLoggingSource.ServiceLevelSendReply | MessageLoggingSource.LastChance);
System\ServiceModel\ServiceHost.cs (1)
837
MessageLogger
.EnsureInitialized(); //force config validation instead of waiting for the first message exchange