97 references to W3CLoggingFields
Logging.W3C.Sample (1)
Startup.cs (1)
17
logging.LoggingFields =
W3CLoggingFields
.All;
Microsoft.AspNetCore.HttpLogging (79)
FileLoggerProcessor.cs (1)
23
private
W3CLoggingFields
_fields;
W3CLogger.cs (2)
15
private
W3CLoggingFields
_loggingFields;
42
if (_loggingFields.HasFlag((
W3CLoggingFields
)(1 << i)))
W3CLoggerOptions.cs (18)
121
public
W3CLoggingFields
LoggingFields { get; set; } =
W3CLoggingFields
.Date |
W3CLoggingFields
.Time |
122
W3CLoggingFields
.ServerName |
W3CLoggingFields
.Method |
W3CLoggingFields
.UriStem |
W3CLoggingFields
.UriQuery |
123
W3CLoggingFields
.ProtocolStatus |
W3CLoggingFields
.TimeTaken |
W3CLoggingFields
.ProtocolVersion |
124
W3CLoggingFields
.Host |
W3CLoggingFields
.UserAgent |
W3CLoggingFields
.Referer |
W3CLoggingFields
.ConnectionInfoFields;
130
if (options.LoggingFields.HasFlag(
W3CLoggingFields
.Host))
134
if (options.LoggingFields.HasFlag(
W3CLoggingFields
.Referer))
138
if (options.LoggingFields.HasFlag(
W3CLoggingFields
.UserAgent))
142
if (options.LoggingFields.HasFlag(
W3CLoggingFields
.Cookie))
W3CLoggerProcessor.cs (18)
16
private readonly
W3CLoggingFields
_loggingFields;
39
if (_loggingFields.HasFlag(
W3CLoggingFields
.Date))
43
if (_loggingFields.HasFlag(
W3CLoggingFields
.Time))
47
if (_loggingFields.HasFlag(
W3CLoggingFields
.ClientIpAddress))
51
if (_loggingFields.HasFlag(
W3CLoggingFields
.UserName))
55
if (_loggingFields.HasFlag(
W3CLoggingFields
.ServerName))
59
if (_loggingFields.HasFlag(
W3CLoggingFields
.ServerIpAddress))
63
if (_loggingFields.HasFlag(
W3CLoggingFields
.ServerPort))
67
if (_loggingFields.HasFlag(
W3CLoggingFields
.Method))
71
if (_loggingFields.HasFlag(
W3CLoggingFields
.UriStem))
75
if (_loggingFields.HasFlag(
W3CLoggingFields
.UriQuery))
79
if (_loggingFields.HasFlag(
W3CLoggingFields
.ProtocolStatus))
83
if (_loggingFields.HasFlag(
W3CLoggingFields
.TimeTaken))
87
if (_loggingFields.HasFlag(
W3CLoggingFields
.ProtocolVersion))
91
if (_loggingFields.HasFlag(
W3CLoggingFields
.Host))
95
if (_loggingFields.HasFlag(
W3CLoggingFields
.UserAgent))
99
if (_loggingFields.HasFlag(
W3CLoggingFields
.Cookie))
103
if (_loggingFields.HasFlag(
W3CLoggingFields
.Referer))
W3CLoggingMiddleware.cs (40)
25
internal static readonly int _dateIndex = BitOperations.Log2((int)
W3CLoggingFields
.Date);
26
internal static readonly int _timeIndex = BitOperations.Log2((int)
W3CLoggingFields
.Time);
27
internal static readonly int _clientIpIndex = BitOperations.Log2((int)
W3CLoggingFields
.ClientIpAddress);
28
internal static readonly int _userNameIndex = BitOperations.Log2((int)
W3CLoggingFields
.UserName);
29
internal static readonly int _serverNameIndex = BitOperations.Log2((int)
W3CLoggingFields
.ServerName);
30
internal static readonly int _serverIpIndex = BitOperations.Log2((int)
W3CLoggingFields
.ServerIpAddress);
31
internal static readonly int _serverPortIndex = BitOperations.Log2((int)
W3CLoggingFields
.ServerPort);
32
internal static readonly int _methodIndex = BitOperations.Log2((int)
W3CLoggingFields
.Method);
33
internal static readonly int _uriStemIndex = BitOperations.Log2((int)
W3CLoggingFields
.UriStem);
34
internal static readonly int _uriQueryIndex = BitOperations.Log2((int)
W3CLoggingFields
.UriQuery);
35
internal static readonly int _protocolStatusIndex = BitOperations.Log2((int)
W3CLoggingFields
.ProtocolStatus);
36
internal static readonly int _timeTakenIndex = BitOperations.Log2((int)
W3CLoggingFields
.TimeTaken);
37
internal static readonly int _protocolVersionIndex = BitOperations.Log2((int)
W3CLoggingFields
.ProtocolVersion);
38
internal static readonly int _hostIndex = BitOperations.Log2((int)
W3CLoggingFields
.Host);
39
internal static readonly int _userAgentIndex = BitOperations.Log2((int)
W3CLoggingFields
.UserAgent);
40
internal static readonly int _cookieIndex = BitOperations.Log2((int)
W3CLoggingFields
.Cookie);
41
internal static readonly int _refererIndex = BitOperations.Log2((int)
W3CLoggingFields
.Referer);
82
if (options.LoggingFields.HasFlag(
W3CLoggingFields
.Date))
87
if (options.LoggingFields.HasFlag(
W3CLoggingFields
.Time))
92
if (options.LoggingFields.HasFlag(
W3CLoggingFields
.ServerName))
98
if ((
W3CLoggingFields
.ConnectionInfoFields & options.LoggingFields) !=
W3CLoggingFields
.None)
102
if (options.LoggingFields.HasFlag(
W3CLoggingFields
.ClientIpAddress))
107
if (options.LoggingFields.HasFlag(
W3CLoggingFields
.ServerIpAddress))
112
if (options.LoggingFields.HasFlag(
W3CLoggingFields
.ServerPort))
120
if ((
W3CLoggingFields
.Request & options.LoggingFields) !=
W3CLoggingFields
.None)
122
if (options.LoggingFields.HasFlag(
W3CLoggingFields
.ProtocolVersion))
127
if (options.LoggingFields.HasFlag(
W3CLoggingFields
.Method))
132
if (options.LoggingFields.HasFlag(
W3CLoggingFields
.UriStem))
137
if (options.LoggingFields.HasFlag(
W3CLoggingFields
.UriQuery))
142
if ((
W3CLoggingFields
.RequestHeaders & options.LoggingFields) !=
W3CLoggingFields
.None)
144
if (options.LoggingFields.HasFlag(
W3CLoggingFields
.Host))
152
if (options.LoggingFields.HasFlag(
W3CLoggingFields
.Referer))
160
if (options.LoggingFields.HasFlag(
W3CLoggingFields
.UserAgent))
170
if (options.LoggingFields.HasFlag(
W3CLoggingFields
.Cookie))
207
if (options.LoggingFields.HasFlag(
W3CLoggingFields
.UserName))
212
if (options.LoggingFields.HasFlag(
W3CLoggingFields
.ProtocolStatus))
217
if (options.LoggingFields.HasFlag(
W3CLoggingFields
.TimeTaken))
Microsoft.AspNetCore.HttpLogging.Tests (17)
FileLoggerProcessorTests.cs (2)
498
LoggingFields =
W3CLoggingFields
.Time,
514
options.LoggingFields =
W3CLoggingFields
.Date;
W3CLoggerOptionsTests.cs (2)
13
Assert.False(options.LoggingFields.HasFlag(
W3CLoggingFields
.UserName));
14
Assert.False(options.LoggingFields.HasFlag(
W3CLoggingFields
.Cookie));
W3CLoggerTests.cs (5)
20
LoggingFields =
W3CLoggingFields
.Date |
W3CLoggingFields
.Time,
63
LoggingFields =
W3CLoggingFields
.UriQuery |
W3CLoggingFields
.Host |
W3CLoggingFields
.ProtocolStatus,
W3CLoggingMiddlewareTests.cs (8)
42
options.CurrentValue.LoggingFields =
W3CLoggingFields
.None;
154
options.CurrentValue.LoggingFields =
W3CLoggingFields
.Cookie;
185
options.CurrentValue.LoggingFields =
W3CLoggingFields
.None;
220
options.CurrentValue.LoggingFields = options.CurrentValue.LoggingFields |
W3CLoggingFields
.Host |
221
W3CLoggingFields
.Referer |
W3CLoggingFields
.UserAgent |
222
W3CLoggingFields
.Cookie;
275
options.CurrentValue.LoggingFields =
W3CLoggingFields
.TimeTaken;