-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Description
Right now, the delimiter that separates individual filter specs in the EventSource logger provider is ;. So multiple filter specs are provided as: Microsoft:Information;System:Information;MyApp:Trace
However, when this is encoded into an .eventpipeconfig file, it ends up looking like this:
Providers=Microsoft-Extensions-Logging:0x4:0:FilterSpecs=Microsoft:Information;SampleWebApp:Trace
The problem is that ; is also the delimiter between individual key/value "parameters" in the .eventpipeconfig file, so if an EventPipe Provider had two key/value pairs (A and B) you'd configure them like this:
Providers=MyProvider:0:0:A=1;B=2, ... other providers ...
Because of this conflict, only the first filter spec actually makes it all the way to EventSourceLogger.
There are a few ways to resolve this:
- Change coreclr to use a different delimiter other than
;for their parameters, or to support "quoting" or "escaping" of some form (cc @vancem for considering the feasibility of this, given it's already shipped :)). - Change
EventSourceLoggerto support an alternate delimiter (such as|). There are a few ways we could do this:
a. UseIndexOfto check for one or the other and determine which path to go along
b. Support using both in a single string
c. Use a new parameter name (FilterSpecs2) to represent the "new" format.