I am using Enterprise Library SLAB for Logging but always since coupel of days I am getting error Use of undefined keyword value 0x1 for event ApplicationStarted. It is compiling fine but throwing runtime error just when we try to enable log event using following line
listener.EnableEvents(Logger.Log, EventLevel.LogAlways, Microsoft.Practices.EnterpriseLibrary.SemanticLogging.Keywords.All)
;
Here is my eventsource
public static readonly Logger Log = new Logger();
[Event(100, Level = EventLevel.Informational, Keywords = Keywords.Application, Task = Tasks.ApplicationStarted, Opcode = Opcodes.Start, Version = 1)]
public void ApplicationStarted()
{
if (this.IsEnabled(EventLevel.Informational, Keywords.Application))
{
this.WriteEvent(100);
}
}
[Event(101, Level = EventLevel.Informational, Keywords = Keywords.Application, Task = Tasks.ApplicationClosed, Opcode = Opcodes.Closed, Version = 1)]
public void ApplicationClosed()
{
if (this.IsEnabled(EventLevel.Informational, Keywords.Application))
{
this.WriteEvent(101);
}
}