You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Bridges all ILogger-based logging to EventSource/EventListener logging.
17
17
/// </summary>
18
18
/// <remarks>
19
-
/// You turn this logging on by enabling the EventSource called
20
-
///
21
-
/// Microsoft-Extensions-Logging
22
-
///
23
-
/// When you enabled the EventSource, the EventLevel you set is translated in the obvious way to the level
24
-
/// associated with the ILogger (thus Debug = verbose, Informational = Informational ... Critical == Critical)
25
-
///
26
-
/// This allows you to filter by event level in a straightforward way.
27
-
///
28
-
/// For finer control you can specify a EventSource Argument called
29
-
///
30
-
/// FilterSpecs
31
-
///
32
-
/// The FilterSpecs argument is a semicolon separated list of specifications. Where each specification is
33
-
///
34
-
/// SPEC = // empty spec, same as *
35
-
/// | NAME // Just a name the level is the default level
36
-
/// | NAME : LEVEL // specifies level for a particular logger (can have a * suffix).
37
-
///
38
-
/// When "UseAppFilters" is specified in the FilterSpecs, it avoids disabling all categories which happens by default otherwise.
39
-
///
40
-
/// Where Name is the name of a ILoggger (case matters), Name can have a * which acts as a wildcard
41
-
/// AS A SUFFIX. Thus Net* will match any loggers that start with the 'Net'.
42
-
///
43
-
/// The LEVEL is a number or a LogLevel string. 0=Trace, 1=Debug, 2=Information, 3=Warning, 4=Error, Critical=5
44
-
/// This specifies the level for the associated pattern. If the number is not specified, (first form
45
-
/// of the specification) it is the default level for the EventSource.
46
-
///
47
-
/// First match is used if a particular name matches more than one pattern.
48
-
///
49
-
/// In addition the level and FilterSpec argument, you can also set EventSource Keywords. See the Keywords
50
-
/// definition below, but basically you get to decide if you wish to have
51
-
///
52
-
/// * Keywords.Message - You get the event with the data in parsed form.
53
-
/// * Keywords.JsonMessage - you get an event with the data in parse form but as a JSON blob (not broken up by argument ...)
54
-
/// * Keywords.FormattedMessage - you get an event with the data formatted as a string
55
-
///
56
-
/// It is expected that you will turn only one of these keywords on at a time, but you can turn them all on (and get
57
-
/// the same data logged three different ways.
58
-
///
59
-
/// Example Usage
60
-
///
61
-
/// This example shows how to use an EventListener to get ILogging information
62
-
///
19
+
/// <para>
20
+
/// To turn this logging on, you enable the EventSource called <c>Microsoft-Extensions-Logging</c>. When you enable the EventSource, the EventLevel you set is translated in to the level associated with the ILogger (thus <c>Debug</c> = <c>verbose</c>, <c>Informational</c> = <c>Informational</c>, <c>Critical</c> == <c>Critical</c>). This allows you to filter by event level in a straightforward way.
21
+
/// </para>
22
+
/// <para>
23
+
/// For finer control, you can specify an EventSource argument called <c>FilterSpecs</c>. The <c>FilterSpecs</c> argument is a semicolon-separated list of specifications. Where each specification is:
24
+
/// </para>
25
+
/// <para>
26
+
/// SPEC = // Empty spec, same as *.
27
+
/// </para>
28
+
/// <para>
29
+
/// | NAME // Named spec. Uses the default level.
30
+
/// </para>
31
+
/// <para>
32
+
/// | NAME : LEVEL // Specifies level for a particular logger (can have a * suffix).
33
+
/// </para>
34
+
/// <para>
35
+
/// When "UseAppFilters" is specified in the <c>FilterSpecs</c>, it avoids disabling all categories, which happens by default otherwise.
36
+
/// </para>
37
+
/// <para>
38
+
/// <c>Name</c> is the name of an <see cref="ILogger"/> (case matters), and can end with *, which acts as a wildcard. For example, <c>Net*</c> will match any loggers that start with 'Net'.
39
+
/// </para>
40
+
/// <para>
41
+
/// <c>LEVEL</c> is a number or a <see cref="LogLevel"/> string (0=Trace, 1=Debug, 2=Information, 3=Warning, 4=Error, Critical=5). This specifies the level for the associated pattern. If the number isn't specified (first form of the specification), it's the default level for the EventSource.
42
+
/// </para>
43
+
/// <para>
44
+
/// The first match is used if a particular name matches more than one pattern.
45
+
/// </para>
46
+
/// <para>
47
+
/// In addition to the level and <c>FilterSpecs</c> argument, you can also set EventSource keywords:
48
+
/// </para>
49
+
/// <para>
50
+
/// * Keywords.Message - Event contains data in parsed form.
51
+
/// </para>
52
+
/// <para>
53
+
/// * Keywords.JsonMessage - Event contains data in parsed form but as a JSON blob (not broken up by argument).
54
+
/// </para>
55
+
/// <para>
56
+
/// * Keywords.FormattedMessage - Event contains data formatted as a string.
57
+
/// </para>
58
+
/// <para>
59
+
/// It's expected that only one of these keywords is turned on at a time, but you can turn them all on (and get
60
+
/// the same data logged three different ways).
61
+
/// </para>
62
+
/// </remarks>
63
+
/// <example>
64
+
/// This example shows how to use an EventListener to get ILogging information.
0 commit comments