I am using latest EventSource Nuget-Package for creating eventlogs where every application gets its own folder for different types of logs.
As playing around I figured out that I can't simply change the logs name. I tried to change it in the manifest file and registered the new channel where it displayed its new name. Unfortunately every event fired to these logs won't show up anymore till I register a new channel with predefined channel name.
Any chance to change that? Since I have to create manifest files on each machine i have to change it programatically because channel names were created by predefined values (Admin, Operational, etc...)
To be clear: I want to change following names AND have all logs written into these channels.
Sample-manifest which was generated automatically:
<instrumentationManifest xmlns="http://schemas.microsoft.com/win/2004/08/events">
<instrumentation xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:win="http://manifests.microsoft.com/win/2004/08/windows/events">
<events xmlns="http://schemas.microsoft.com/win/2004/08/events">
<provider name="Samples-EventSourceDemos-EventLog" guid="{d89ec17d-ee69-5275-eb6f-0c826bb76bd8}" resourceFileName="E:\EventlogTest\bin\Debug\EventlogTest.Samples-EventSourceDemos-EventLog.etwManifest.dll" messageFileName="E:\EventlogTest\bin\Debug\EventlogTest.Samples-EventSourceDemos-EventLog.etwManifest.dll" symbol="SamplesEventSourceDemosEventLog">
<channels>
<channel chid="Admin" name="Samples-EventSourceDemos-EventLog/Admin" value="16" type="Admin" enabled="true"/>
<channel chid="Analytic" name="Samples-EventSourceDemos-EventLog/Analytic" value="18" type="Analytic" enabled="false"/>
<channel chid="Debug" name="Samples-EventSourceDemos-EventLog/Debug" value="19" type="Debug" enabled="false"/>
</channels>
<tasks>
<task name="Request" message="$(string.task_Request)" value="1"/>
<task name="DebugTrace" message="$(string.task_DebugTrace)" value="65530"/>
</tasks>
<opcodes>
</opcodes>
<keywords>
<keyword name="Requests" message="$(string.keyword_Requests)" mask="0x1"/>
<keyword name="Debug" message="$(string.keyword_Debug)" mask="0x2"/>
<keyword name="Session3" message="$(string.keyword_Session3)" mask="0x100000000000"/>
<keyword name="Session2" message="$(string.keyword_Session2)" mask="0x200000000000"/>
<keyword name="Session1" message="$(string.keyword_Session1)" mask="0x400000000000"/>
<keyword name="Session0" message="$(string.keyword_Session0)" mask="0x800000000000"/>
</keywords>
<events>
<event value="1" version="0" level="win:Error" symbol="RequestStart" message="$(string.event_RequestStart)" keywords="Requests" opcode="win:Start" task="Request" channel="Admin" template="RequestStartArgs"/>
<event value="2" version="0" level="win:Error" symbol="RequestPhase" message="$(string.event_RequestPhase)" keywords="Requests" task="Request" channel="Analytic" template="RequestPhaseArgs"/>
<event value="3" version="0" level="win:Error" symbol="RequestStop" message="$(string.event_RequestStop)" keywords="Requests" opcode="win:Stop" task="Request" channel="Admin" template="RequestStopArgs"/>
<event value="4" version="0" level="win:Error" symbol="DebugTrace" message="$(string.event_DebugTrace)" keywords="Debug" task="DebugTrace" channel="Debug" template="DebugTraceArgs"/>
</events>
<templates>
<template tid="RequestStartArgs">
<data name="RequestID" inType="win:Int32"/>
<data name="Url" inType="win:UnicodeString"/>
</template>
<template tid="RequestPhaseArgs">
<data name="RequestID" inType="win:Int32"/>
<data name="PhaseName" inType="win:UnicodeString"/>
</template>
<template tid="RequestStopArgs">
<data name="RequestID" inType="win:Int32"/>
</template>
<template tid="DebugTraceArgs">
<data name="Message" inType="win:UnicodeString"/>
</template>
</templates>
</provider>
</events>
</instrumentation>
<localization>
<resources culture="de-DE">
<stringTable>
<string id="event_DebugTrace" value="DebugMessage: %1"/>
<string id="event_RequestPhase" value="Entering Phase %2 for request %1"/>
<string id="event_RequestStart" value="Start processing request%n%t*** %1 ***%nfor URL%n%t=== %2 ==="/>
<string id="event_RequestStop" value="Stop processing request%n%t*** %1 ***"/>
<string id="keyword_Debug" value="Debug"/>
<string id="keyword_Requests" value="Requests"/>
<string id="keyword_Session0" value="Session0"/>
<string id="keyword_Session1" value="Session1"/>
<string id="keyword_Session2" value="Session2"/>
<string id="keyword_Session3" value="Session3"/>
<string id="task_DebugTrace" value="DebugTrace"/>
<string id="task_Request" value="Request"/>
</stringTable>
</resources>
</localization>
</instrumentationManifest>
Thanks for your help.