Currently, I'm using EventSourceAttribute to create a hierarchy of subfolders in Application and Services log in Event Viewer. This is my code
[EventSource(Name = "Service-MacClient-EventSource")]
public sealed class MinimalEventSource : EventSource
{
public static MinimalEventSource Log = new MinimalEventSource();
[Event(1, Channel = EventChannel.Operational, Message = "{0}", Level = EventLevel.Informational)]
public void Info(string msg)
{
WriteEvent(1, msg);
}
}
In Application and Services logs, the folders came out to be Service > MacClient > EventSource.
However, what I wanted was spaces between every capital letters in the folder names e.g. Service > Mac Client > Event Source. So I tried to change it to
[EventSource(Name = "Service-Mac Client-Event Source")]
But unfortunately, I encountered this error while building my project
MSXML Schema Validation Error 0xc00ce169. At Line=4, Column=426, 'ServiceMac ClientEvent Source' violates pattern constraint of '()|([_a-zA-Z][_0-9a-zA-Z]*)'.
May I know how do I add spaces to folder names that are being created in Event Viewer > Application and Services please? Thanks in advance!
Additional notes
Microsoft's User Experience Virtualization seems to show that adding spaces for names of subfolders in Application and Services log in Event Viewer is possible.

