Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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 @@ -29,7 +29,7 @@ public static void Associate(object first, object second, [CallerMemberName] str
public static void Associate(object? thisOrContextObject, object first, object second, [CallerMemberName] string? memberName = null) =>
Log.Associate(IdOf(thisOrContextObject), memberName, IdOf(first), IdOf(second));

[Event(AssociateEventId, Level = EventLevel.Informational, Keywords = Keywords.Default, Message = "[{2}]<-->[{3}]")]
[Event(AssociateEventId, Level = EventLevel.Informational, Message = "[{2}]<-->[{3}]")]
private void Associate(string thisOrContextObject, string? memberName, string first, string second)
{
Debug.Assert(IsEnabled());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static void DumpBuffer(object? thisOrContextObject, byte[] buffer, int of
public static void DumpBuffer(object? thisOrContextObject, ReadOnlySpan<byte> buffer, [CallerMemberName] string? memberName = null) =>
Log.DumpBuffer(IdOf(thisOrContextObject), memberName, buffer.Slice(0, Math.Min(buffer.Length, MaxDumpSize)).ToArray());

[Event(DumpArrayEventId, Level = EventLevel.Verbose, Keywords = Keywords.Debug)]
[Event(DumpArrayEventId, Level = EventLevel.Verbose)]
private void DumpBuffer(string thisOrContextObject, string? memberName, byte[] buffer) =>
WriteEvent(DumpArrayEventId, thisOrContextObject, memberName ?? MissingMember, buffer);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@ internal sealed partial class NetEventSource : EventSource
public static readonly NetEventSource Log = new NetEventSource();

#region Metadata
public static class Keywords
{
public const EventKeywords Default = (EventKeywords)0x0001;
public const EventKeywords Debug = (EventKeywords)0x0002;
}

private const string MissingMember = "(?)";
private const string NullInstance = "(null)";
private const string StaticMethodObject = "(static)";
Expand Down Expand Up @@ -74,7 +68,7 @@ public static void Info(object? thisOrContextObject, FormattableString? formatta
public static void Info(object? thisOrContextObject, object? message, [CallerMemberName] string? memberName = null) =>
Log.Info(IdOf(thisOrContextObject), memberName, Format(message));

[Event(InfoEventId, Level = EventLevel.Informational, Keywords = Keywords.Default)]
[Event(InfoEventId, Level = EventLevel.Informational)]
private void Info(string thisOrContextObject, string? memberName, string? message)
{
Debug.Assert(IsEnabled());
Expand All @@ -99,7 +93,7 @@ public static void Error(object? thisOrContextObject, FormattableString formatta
public static void Error(object? thisOrContextObject, object message, [CallerMemberName] string? memberName = null) =>
Log.ErrorMessage(IdOf(thisOrContextObject), memberName, Format(message));

[Event(ErrorEventId, Level = EventLevel.Error, Keywords = Keywords.Default)]
[Event(ErrorEventId, Level = EventLevel.Error)]
private void ErrorMessage(string thisOrContextObject, string? memberName, string? message)
{
Debug.Assert(IsEnabled());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,51 +20,51 @@ internal sealed partial class NetEventSource
private const int OperationReturnedSomethingId = AcceptSecuritContextId + 1;
// Make sure to update the event IDs in NetEventSource.Security.cs if you add more events here

[Event(EnumerateSecurityPackagesId, Keywords = Keywords.Default, Level = EventLevel.Informational)]
[Event(EnumerateSecurityPackagesId, Level = EventLevel.Informational)]
public void EnumerateSecurityPackages(string? securityPackage) =>
WriteEvent(EnumerateSecurityPackagesId, securityPackage);

[Event(SspiPackageNotFoundId, Keywords = Keywords.Default, Level = EventLevel.Informational)]
[Event(SspiPackageNotFoundId, Level = EventLevel.Informational)]
public void SspiPackageNotFound(string packageName) =>
WriteEvent(SspiPackageNotFoundId, packageName);

[Event(AcquireDefaultCredentialId, Keywords = Keywords.Default, Level = EventLevel.Informational)]
[Event(AcquireDefaultCredentialId, Level = EventLevel.Informational)]
public void AcquireDefaultCredential(string packageName, Interop.SspiCli.CredentialUse intent) =>
WriteEvent(AcquireDefaultCredentialId, packageName, intent);

[NonEvent]
public void AcquireCredentialsHandle(string packageName, Interop.SspiCli.CredentialUse intent, object authdata) =>
AcquireCredentialsHandle(packageName, intent, IdOf(authdata));

[Event(AcquireCredentialsHandleId, Keywords = Keywords.Default, Level = EventLevel.Informational)]
[Event(AcquireCredentialsHandleId, Level = EventLevel.Informational)]
public void AcquireCredentialsHandle(string packageName, Interop.SspiCli.CredentialUse intent, string authdata) =>
WriteEvent(AcquireCredentialsHandleId, packageName, (int)intent, authdata);

[NonEvent]
public void InitializeSecurityContext(SafeFreeCredentials? credential, SafeDeleteContext? context, string? targetName, Interop.SspiCli.ContextFlags inFlags) =>
InitializeSecurityContext(IdOf(credential), IdOf(context), targetName, inFlags);

[Event(InitializeSecurityContextId, Keywords = Keywords.Default, Level = EventLevel.Informational)]
[Event(InitializeSecurityContextId, Level = EventLevel.Informational)]
private void InitializeSecurityContext(string credential, string context, string? targetName, Interop.SspiCli.ContextFlags inFlags) =>
WriteEvent(InitializeSecurityContextId, credential, context, targetName, (int)inFlags);

[NonEvent]
public void AcceptSecurityContext(SafeFreeCredentials? credential, SafeDeleteContext? context, Interop.SspiCli.ContextFlags inFlags) =>
AcceptSecurityContext(IdOf(credential), IdOf(context), inFlags);

[Event(AcceptSecuritContextId, Keywords = Keywords.Default, Level = EventLevel.Informational)]
[Event(AcceptSecuritContextId, Level = EventLevel.Informational)]
private void AcceptSecurityContext(string credential, string context, Interop.SspiCli.ContextFlags inFlags) =>
WriteEvent(AcceptSecuritContextId, credential, context, (int)inFlags);

[Event(OperationReturnedSomethingId, Keywords = Keywords.Default, Level = EventLevel.Informational, Message = "{0} returned {1}.")]
[Event(OperationReturnedSomethingId, Level = EventLevel.Informational, Message = "{0} returned {1}.")]
public void OperationReturnedSomething(string operation, Interop.SECURITY_STATUS errorCode) =>
WriteEvent(OperationReturnedSomethingId, operation, errorCode);

[Event(SecurityContextInputBufferId, Keywords = Keywords.Default, Level = EventLevel.Informational)]
[Event(SecurityContextInputBufferId, Level = EventLevel.Informational)]
public void SecurityContextInputBuffer(string context, int inputBufferSize, int outputBufferSize, Interop.SECURITY_STATUS errorCode) =>
WriteEvent(SecurityContextInputBufferId, context, inputBufferSize, outputBufferSize, (int)errorCode);

[Event(SecurityContextInputBuffersId, Keywords = Keywords.Default, Level = EventLevel.Informational)]
[Event(SecurityContextInputBuffersId, Level = EventLevel.Informational)]
public void SecurityContextInputBuffers(string context, int inputBuffersSize, int outputBufferSize, Interop.SECURITY_STATUS errorCode) =>
WriteEvent(SecurityContextInputBuffersId, context, inputBuffersSize, outputBufferSize, (int)errorCode);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ public static EventSourceTestLogging Log
}
}

[Event(1, Keywords = Keywords.Default, Level = EventLevel.Informational)]
[Event(1, Level = EventLevel.Informational)]
public void TestMessage(string message)
{
WriteEvent(1, message);
}

[Event(2, Keywords = Keywords.Debug, Level = EventLevel.Verbose)]
[Event(2, Level = EventLevel.Verbose)]
public void TestVerboseMessage(string message)
{
WriteEvent(2, message);
}

[Event(3, Keywords = Keywords.Debug, Level = EventLevel.Error)]
[Event(3, Level = EventLevel.Error)]
public void TestAncillaryError(Exception ex)
{
WriteEvent(3, ex.ToString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static void UriBaseAddress(object obj, Uri? baseAddress)
Log.UriBaseAddress(baseAddress?.ToString(), IdOf(obj));
}

[Event(UriBaseAddressId, Keywords = Keywords.Debug, Level = EventLevel.Informational)]
[Event(UriBaseAddressId, Level = EventLevel.Informational)]
private void UriBaseAddress(string? uriBaseAddress, string objName) =>
WriteEvent(UriBaseAddressId, uriBaseAddress, objName);

Expand All @@ -36,19 +36,19 @@ public static void ContentNull(object obj)
Log.ContentNull(IdOf(obj), GetHashCode(obj));
}

[Event(ContentNullId, Keywords = Keywords.Debug, Level = EventLevel.Informational)]
[Event(ContentNullId, Level = EventLevel.Informational)]
private void ContentNull(string objName, int objHash) =>
WriteEvent(ContentNullId, objName, objHash);

[Event(HeadersInvalidValueId, Keywords = Keywords.Debug, Level = EventLevel.Error)]
[Event(HeadersInvalidValueId, Level = EventLevel.Error)]
public void HeadersInvalidValue(string name, string rawValue) =>
WriteEvent(HeadersInvalidValueId, name, rawValue);

[Event(HandlerMessageId, Keywords = Keywords.Debug, Level = EventLevel.Verbose)]
[Event(HandlerMessageId, Level = EventLevel.Verbose)]
public void HandlerMessage(int poolId, int workerId, int requestId, string? memberName, string? message) =>
WriteEvent(HandlerMessageId, poolId, workerId, requestId, memberName, message);

[Event(HandlerErrorId, Keywords = Keywords.Debug, Level = EventLevel.Error)]
[Event(HandlerErrorId, Level = EventLevel.Error)]
public void HandlerMessageError(int poolId, int workerId, int requestId, string? memberName, string message) =>
WriteEvent(HandlerErrorId, poolId, workerId, requestId, memberName, message);

Expand All @@ -59,7 +59,7 @@ public static void AuthenticationInfo(Uri uri, string message)
Log.AuthenticationInfo(uri?.ToString(), message);
}

[Event(AuthenticationInfoId, Keywords = Keywords.Debug, Level = EventLevel.Verbose)]
[Event(AuthenticationInfoId, Level = EventLevel.Verbose)]
public void AuthenticationInfo(string? uri, string message) =>
WriteEvent(AuthenticationInfoId, uri, message);

Expand All @@ -70,7 +70,7 @@ public static void AuthenticationError(Uri? uri, string message)
Log.AuthenticationError(uri?.ToString(), message);
}

[Event(AuthenticationErrorId, Keywords = Keywords.Debug, Level = EventLevel.Error)]
[Event(AuthenticationErrorId, Level = EventLevel.Error)]
public void AuthenticationError(string? uri, string message) =>
WriteEvent(AuthenticationErrorId, uri, message);

Expand Down
Loading
Loading