Example #1
0
        public IConnectionParams CreateParamsFromIdentity(EventLogIdentity identity)
        {
            ConnectionParams p = new ConnectionParams();

            p[ConnectionParamsKeys.IdentityConnectionParam] = identity.ToIdentityString();
            return(p);
        }
Example #2
0
 public LogProvider(ILogProviderHost host, IConnectionParams connectParams, Factory factory)
     :
     base(host,
          factory,
          connectParams,
          new DejitteringParams() { JitterBufferSize = 25 }
          )
 {
     using (trace.NewFrame)
     {
         try
         {
             eventLogIdentity = EventLogIdentity.FromConnectionParams(connectParams);
             StartLiveLogThread("EventLog listening thread");
         }
         catch (Exception e)
         {
             trace.Error(e, "Failed to initialize Windows Event Log reader. Disposing what has been created so far.");
             Dispose();
             throw;
         }
     }
 }
Example #3
0
 string ILogProviderFactory.GetUserFriendlyConnectionName(IConnectionParams connectParams)
 {
     return("Windows Event Log: " + EventLogIdentity.FromConnectionParams(connectParams).ToUserFriendlyString());
 }
Example #4
0
 public IConnectionParams CreateParamsFromEventLogName(string machineName, string eventLogName)
 {
     return(CreateParamsFromIdentity(EventLogIdentity.FromLiveLogParams(machineName, eventLogName)));
 }
Example #5
0
 public IConnectionParams CreateParamsFromFileName(string fileName)
 {
     return(CreateParamsFromIdentity(EventLogIdentity.FromFileName(fileName)));
 }
Example #6
0
 public string GetUserFriendlyConnectionName(IConnectionParams connectParams)
 {
     return("Windows Event Log: " + EventLogIdentity.FromConnectionParams(connectParams).ToUserFriendlyString());
 }